- Home /
Remote notifications in iOS 8
Hi guys, I just got all set up getting remote notifications working using pushsharp and was really excited at how simple it was. Until I realized that Apple changed the way notifications are sent in iOS 8.
Does anyone know if they currently support registering for remote notifications and getting device tokens in iOS 8 yet? I haven't been with Unity long enough so if they currently don't support it, how long usually after the new iOS comes out do they add support for the new ways of doing things or newly added features? Thanks
Steve
Could you just tell me as where to put this code in xcode or in unity ?
Answer by Slobdell · Aug 18, 2014 at 12:14 PM
Well I guess they don't support iOS 8 yet and nobody knows when they will. In the meantime I now get the device token by adding this line to the DidFinishLaunchingWithOptions in the AppController
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge
|UIRemoteNotificationTypeSound
|UIRemoteNotificationTypeAlert) categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
And adding this delegate method to the AppController
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[application registerForRemoteNotifications];
}
The rest takes care of itself and the token will become available on the Unity side in NotificationServices.DeviceToken
@Slobdell, We have tried to implement push notification as your code for iOS 8. but not working. Is there any another way to do ? Can you help us ?
Answer by Sahkan · Dec 08, 2014 at 11:18 AM
Hey Slobdell ! I see your answered is marked as good, however, where do you implement this code ? this one is in Cpp and unity uses c#. is it an Unity3D plugin ? is it a CodeX tweak ? can you please give more details ? Thanks .
Answer by gdeglin · Jan 27, 2015 at 12:28 AM
A lot of 3rd party notification delivery services will provide a Unity SDK that works for iOS 8, and other platforms, without any necessary workarounds.
I help run one designed for game developers called GameThrive.
Your answer
Follow this Question
Related Questions
Unity Mobile Notifications Package Android remote 1 Answer
Android & iOS Push Notifications 3 Answers
Can iPhone remote be used from standard Unity? 2 Answers
Unity Remote 3 Problem 1 Answer
Remote Unity build? 2 Answers