我正在尝试在我的应用程序委托类中编写这些代码
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Let the device know we want to receive push notifications
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
[FlurryAnalytics startSession:@"F9W2NQPF4Y587SM2Z3XU"];
// Override point for customization after application launch.
// Add the tab bar controller's view to the window and display.
[self.window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
self.tabBarController.delegate=self;
[self.tabBarController.tabBar setSelectedImageTintColor:[UIColor greenColor]];
[window addSubview:OCRScreen.view];
[window makeKeyAndVisible];
[OCRScreen displayScreen];
[OCRScreen.view removeFromSuperview];
return YES;
}
但它在第一行出现错误后给了我错误。OCRAppDelegate.mm:错误:语义问题:无法使用“int”类型的右值初始化“UIRemoteNotificationType”类型的参数
当我将 .mm 更改为 .m 时,它不会给出此错误。请帮忙