Google Cloud Messaging with Xcode 7 and iOS 9

后端 未结 1 798
南旧
南旧 2021-01-11 16:59

I\'ve managed to use GCM with Android devices, but now I\'m trying to implement on an iOS app.

I think I followed all the necessary steps to be able to use the GCM s

相关标签:
1条回答
  • 2021-01-11 17:38

    I was able to do effectively the same thing as the fix in your edit without messing with the certificates. Obviously this won't work if you already have everything setup, and are using both the development and production environments, but if you're just in the development stage it's easy enough to change.

    In the Gcm example project (for objective-c) in application: didRegisterForRemoteNotificationsWithDeviceToken I simply changed the code from:

        _registrationOptions = @{kGGLInstanceIDRegisterAPNSOption:deviceToken,
                                 kGGLInstanceIDAPNSServerTypeSandboxOption:@YES};
    

    To

        _registrationOptions = @{kGGLInstanceIDRegisterAPNSOption:deviceToken,
                                 kGGLInstanceIDAPNSServerTypeSandboxOption:@NO};
    

    I understand this isn't exactly a real fix, but it at least made it work without changing any certificates (as long as the production certificate is setup.

    0 讨论(0)
提交回复
热议问题