I am trying to write this pience of code in my app delegate class
- (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;
}
but it’s giving me error following error on first line.
OCRAppDelegate.mm: error: Semantic Issue: Cannot initialize a parameter of type ‘UIRemoteNotificationType’ with an rvalue of type ‘int’
when i change .mm to .m then it doesn’t gives this error.
Please help
just change the first line of code to this:
now it will work.