If the Pushy.register()
callback isn't invoked in your iOS app, please ensure your project isn't using any other push notification library, such as Firebase Cloud Messaging, Firebase Auth, APNs, OneSignal, React Native Push Notification, etc.
These libraries clash with the Pushy iOS SDK as they hook into (swizzle) the APNs methods which the Pushy iOS SDK relies on.
Also, please make sure your AppDelegate
class does not override any of the following APNs methods:
application:didRegisterForRemoteNotificationsWithDeviceToken
application:didFailToRegisterForRemoteNotificationsWithError
application:didReceiveRemoteNotification:fetchCompletionHandler
If you'd like to use multiple push libraries at the same time, please see this article to disable swizzling in the Pushy iOS SDK while invoking our internal methods manually in each AppDelegate APNs callback.
iOS 13: Due to a bug in iOS 13, the pushy.register()
callback may never be called when your device is connected through Wi-Fi in rare scenarios. The only solution appears to be to temporarily connect to a different Wi-Fi network, or connecting through cellular instead. This bug was fixed by Apple in later versions of iOS.