Self-Managed Integration
To make integrations easier the PushSDK automatically integrates itself into your application delegate and user notification center by using method swizzling. You may want to disable the automatic integration in several scenarios including:
Conflicts with other SDKs that also include swizzling or other automatic integrations
Conflicting third party development solutions
Our method swizzling conflicts with your existing architecture
Add the following method call before calling PushSDK.setConfiguration:
PushSDK.disableMethodSwizzling()[PushSDK disableMethodSwizzling];This must be invoked before calling
PushSDK.setConfiguration(appKey: myAppKey, withLaunchOptions: launchOptions)
Once swizzling has been disabled you'll also be required to place calls to the PushSDK to invoke the methods that are no longer swizzled. If you do not implement all of the following methods the PushSDK may not function properly.
The methods you must call manually are:
application:didRegisterForRemoteNotificationsWithDeviceToken:application:didFailToRegisterForRemoteNotificationsWithError:application:didReceiveRemoteNotification:fetchCompletionHandler:userNotificationCenter:willPresent:withCompletionHandler:userNotificationCenter:didReceive:withCompletionHandler:If you are targeting iOS version 10 or earlier:
application:didReceiveRemoteNotification:
UIApplicationDelegate Example
UNUserNotificationCenterDelegate Example
Last updated