Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 372af83

Browse files
Merge pull request #7450 from livecodepanos/build_with_xcode_12
[[ Bug 22946 ]] Update the engine to compile with Xcode 12
2 parents 81bd065 + 54489a1 commit 372af83

File tree

4 files changed

+23
-51
lines changed

4 files changed

+23
-51
lines changed

config/ios.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
'WARNING_CFLAGS':
217217
[
218218
'-Wno-return-type',
219+
'-Wno-implicit-function-declaration',
219220
],
220221
},
221222
},

engine/src/mbliphoneapp.mm

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -415,56 +415,27 @@ - (BOOL)application:(UIApplication *)p_application didFinishLaunchingWithOptions
415415
NSArray *t_allowed_push_notifications_array;
416416
t_allowed_push_notifications_array = [t_info_dict objectForKey: @"CFSupportedRemoteNotificationTypes"];
417417

418-
if (t_allowed_push_notifications_array != nil)
419-
{
420-
// MM-2014-09-30: [[ iOS 8 Support ]] Use new iOS 8 registration methods for push notifications.
421-
if (![[UIApplication sharedApplication] respondsToSelector :@selector(registerUserNotificationSettings:)])
422-
{
423-
UIRemoteNotificationType t_allowed_notifications = UIRemoteNotificationTypeNone;
424-
for (NSString *t_push_notification_string in t_allowed_push_notifications_array)
425-
{
426-
if ([t_push_notification_string isEqualToString: @"CFBadge"])
427-
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIRemoteNotificationTypeBadge);
428-
else if ([t_push_notification_string isEqualToString: @"CFSound"])
429-
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIRemoteNotificationTypeSound);
430-
else if ([t_push_notification_string isEqualToString: @"CFAlert"])
431-
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIRemoteNotificationTypeAlert);
432-
}
433-
434-
// IM-2012-02-13 don't try to register if there are no allowed push notification types
435-
if (t_allowed_notifications != UIRemoteNotificationTypeNone)
436-
{
437-
// Inform the device what kind of push notifications we can handle.
438-
439-
// MW-2013-07-29: [[ Bug 10979 ]] Dynamically call the 'registerForRemoteNotificationTypes' to
440-
// avoid app-store warnings.
441-
objc_msgSend([UIApplication sharedApplication], sel_getUid("registerForRemoteNotificationTypes:"), t_allowed_notifications);
442-
}
443-
}
444-
#ifdef __IPHONE_8_0
445-
else
446-
{
447-
UIUserNotificationType t_allowed_notifications;
448-
t_allowed_notifications = UIUserNotificationTypeNone;
449-
for (NSString *t_push_notification_string in t_allowed_push_notifications_array)
450-
{
451-
if ([t_push_notification_string isEqualToString: @"CFBadge"])
452-
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIUserNotificationTypeBadge);
453-
else if ([t_push_notification_string isEqualToString: @"CFSound"])
454-
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIUserNotificationTypeSound);
455-
else if ([t_push_notification_string isEqualToString: @"CFAlert"])
456-
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIUserNotificationTypeAlert);
457-
}
458-
if (t_allowed_notifications != UIUserNotificationTypeNone)
459-
{
460-
m_is_remote_notification = true;
461-
UIUserNotificationSettings *t_push_settings;
462-
t_push_settings = [UIUserNotificationSettings settingsForTypes: t_allowed_notifications categories:nil];
463-
[[UIApplication sharedApplication] registerUserNotificationSettings: t_push_settings];
464-
}
465-
}
466-
#endif
467-
}
418+
if (t_allowed_push_notifications_array != nil)
419+
{
420+
UIUserNotificationType t_allowed_notifications;
421+
t_allowed_notifications = UIUserNotificationTypeNone;
422+
for (NSString *t_push_notification_string in t_allowed_push_notifications_array)
423+
{
424+
if ([t_push_notification_string isEqualToString: @"CFBadge"])
425+
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIUserNotificationTypeBadge);
426+
else if ([t_push_notification_string isEqualToString: @"CFSound"])
427+
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIUserNotificationTypeSound);
428+
else if ([t_push_notification_string isEqualToString: @"CFAlert"])
429+
t_allowed_notifications = (UIRemoteNotificationType) (t_allowed_notifications | UIUserNotificationTypeAlert);
430+
}
431+
if (t_allowed_notifications != UIUserNotificationTypeNone)
432+
{
433+
m_is_remote_notification = true;
434+
UIUserNotificationSettings *t_push_settings;
435+
t_push_settings = [UIUserNotificationSettings settingsForTypes: t_allowed_notifications categories:nil];
436+
[[UIApplication sharedApplication] registerUserNotificationSettings: t_push_settings];
437+
}
438+
}
468439

469440
// MM-2014-09-26: [[ iOS 8 Support ]] Move the registration for orientation updates to here from init. Was causing issues with iOS 8.
470441
// Tell the device we want orientation notifications.

engine/src/mbliphonedc.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#import <AudioToolbox/AudioToolbox.h>
4949
#import <OpenGLES/ES1/gl.h>
5050
#import <OpenGLES/ES1/glext.h>
51-
#import <MediaPlayer/MPMoviePlayerViewController.h>
5251

5352
#include "mbliphoneapp.h"
5453
#include "mbliphoneview.h"

toolchain/lc-compile-ffi-java/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <position.h>
2222
#include "literal.h"
2323
#include "report.h"
24+
#include "outputfile.h"
2425

2526
extern void ROOT(void);
2627
extern void yyExtend(void);

0 commit comments

Comments
 (0)