Troubleshoot Multiple Push SDKs with Swizzling Enabled
If Swizzling is enabled, implement the other push provider’s delegate methods first. When that’s complete, implement the Salesforce Engagement SDK methods.
-
Configure the SDK along with the other Push provider, as shown in these code examples.
Code example for iOS SDK v10 or later:
Code example for iOS SDK v8:
-
Configure the SDK to set the device token, as shown in these code examples.
Code example for iOS SDK v10 or later:
```Code example for iOS SDK v8:
When Swizzling is enabled in the other push provider, respective delegate methods are intercepted. For example, when a push notification is received from Firebase, the payload received in the didReceive notification method for the UNUserNotificationCenterDelegate is altered to receive a MessagingMessageInfo object. Because the payload doesn’t match the format that the SDK expects, the message isn’t reported.
To handle this situation, implement the delegate methods described in these code examples.
Code example for iOS SDK v10 or later:
Code example for iOS SDK v8:
Notification messages from other providers appear in the device’s notification center. However, any action on the notification message from the SDK, such as URL handling or reporting, doesn’t work.