iOS: Disable Swizzling
FlareRain iOS SDK uses Method Swizzling to replace the required method implementation for push notification operation at runtime with its own. As a result, it is possible to achieve a more streamlined integration by eliminating the need for a complicated implementation process.
However, if you want to use it with other push services, you need to disable swizzling so that all services can share the original method. Disabling swizzling requires adding some code.
But don't worry! We have created all 1:1 correspondence methods so that you can integrate very easily. Follow this guide step by step to disable Method Swizzling.
1. Required Steps
Familiarize yourself with the tasks required to disable Method Swizzling. Just add 5 lines!
Update SDK version 1.1.0 or higher
Add FlareLaneSwizzlingEnabled: false to Info.plist
Add 1 method to AppDelegate
Add 2 methods to UNUserNotificationCenter
Add 2 methods to UNNotificationServiceExtension
2. Add a property to Info.plist
After selecting the target project in Xcode, go to Info -> Custom iOS Target Properties -> Add Row

Key: FlareLaneSwizzlingEnabled
Value: 'NO' with Boolean Type

4. Update AppDelegate
application(:didRegisterForRemoteNotificationsWithDeviceToken:)
5. Update UNUserNotificationCenter
Set a delegate of UNUserNotificationCenterDelegate to your AppDelegate
userNotificationCenter(:willPresent:withCompletionHandler:)userNotificationCenter(:didReceive:withCompletionHandler:)
6. Update UNNotificationServiceExtension
didReceive(:withContentHandler:)serviceExtensionTimeWillExpire()
Last updated