Include MoEngage Configuration
After importing the MoEngage package, add a MoEngage-Info.plist file to yourAssets folder (Asset > Import New Asset).
In your MoEngage-Info.plist, set the workspace ID, region, and other configuration values:
XML
SHOULD_PROVIDE_DEEPLINK_CALLBACK to true if your app handles deeplink routing manually instead of letting the SDK handle navigation.
Unity App Controller Swizzling
There are two approaches using which the SDK can be initialized:- Unity App Controller Subclass:
SDK contains theMoEUnityAppControllerclass which is the subclass of UnityAppController. Here we get a callback on AppLaunch to initialize MoEngage SDK. - UnityAppController swizzling:
SetUNITY_CONTROLLER_SWIZZLING_ENABLEDtotrueinMoEngage-Info.plistto enable UnityAppController swizzling. Hereapplication:didfinishLaunchinWithOptions:method is swizzled to initialize MoEngage SDK.
Build and Replace
Once required packages are imported go toFile > Build Settings, switch to iOS platform, and click on Build. Select Replace in the pop-up. It’s necessary to select Replace on first-time integration, this is because we will be updating the build settings of the Xcode project for MoEngage SDK and also installing the native dependencies.

CocoaPods
Make sure CocoaPods is installed in your system before proceeding.
Unity-iPhone.xcworkspace in Xcode to run the app.
Swift Package Manager
As an alternative to CocoaPods, you can use Swift Package Manager (SPM) to manage the MoEngage iOS dependency:- In Xcode, go to File → Add Package Dependencies.
- Enter the MoEngage iOS SDK repository URL and select the required version.
- Add the
MoEngageSDKpackage to theUnity-iPhonetarget. - Remove the generated
Podfileand close the.xcworkspace. OpenUnity-iPhone.xcodeprojdirectly when using SPM.