You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* AppsFlyer Unity Plugin uses the [iOS life cycle](https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle) events for the SDK to work.
4
+
* The plugins uses [UnityAppController](https://docs.unity3d.com/Manual/UnityasaLibrary-iOS.html) for the lifecycle events to be invoked.
5
+
* Sometimes other plugins (Firebase, Facebook, ect) use the same UnityAppController, which creates conflicts in the lifecycle events.
6
+
* These events include didBecomeActive, didEnterBackground, didReceiveRemoteNotification, continueUserActivity and openURL.
7
+
* When a conflict occurs these methods may not be invoked.
8
+
* The solution provided by the AppsFlyer Unity Plugin is [Swizzling](https://medium.com/rocknnull/ios-to-swizzle-or-not-to-swizzle-f8b0ed4a1ce6).
9
+
* Starting from `v6.0.7` there is an option to enable swizzling automatically.
10
+
* To enable swizzling, in the info.plist file, a boolean K/V called `AppsFlyerShouldSwizzle` should be set to 1 (true).
11
+
* This will automatically enable swizzling and solve conflicts with other plugins.
12
+
* This can also be accomplished on the c# side by following these steps:
13
+
14
+
1. Create a new c# script. (we called ours AFUpdatePlist.cs)
15
+
2. Place the script in a editor folder (Assets > Editor > AFUpdatePlist.cs)
Debug.Log("Info.plist updated with AppsFlyerShouldSwizzle");
42
+
}
43
+
44
+
}
45
+
}
46
+
```
47
+
48
+
4. Validate that the code in the [AppsFlyer+AppController](https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/Assets/AppsFlyer/Plugins/iOS/AppsFlyer%2BAppController.m) is called on the native side.
0 commit comments