MoEngage Kit Integration
SDK Installation
Installing using SPM
- Navigate to Project’s settings -> Package Dependencies -> Add Package
- Enter the URL https://github.com/moengage/mparticle-apple-integration-moengage.git and select the branch as master or required version to install the package.
- Click on Add Package.
- Select mParticle-MoEngage product for your app target.
Installing using CocoaPods
Add the kit dependency to your app’s Podfile as shown below:Configure MoEngage SDK
- Disable MoEngageSDK method swizzling by setting MoEngageAppDelegateProxyEnabled as false /NO in app’s Info.plist.
- Get Workspace ID (earlier App ID) from the Settings Page Dashboard —> Settings —> Account —> General and configure the MoEngage SDK in the AppDelegate’s didFinishLaunchingWithOptions callback __ before initializing the mParticle Kit.
Install / Update Differentiation :
Since you might integrate us when your app is already on the App Store, we would need to know whether your app update would be an actual UPDATE or an INSTALL. To differentiate between those, use one of the methods below:Handling Push Notifications
Configuring with mParticle SDK
mParticle SDK provides a way to handle the registration of push token and receive push notifications at the mParticle SDK. Refer Push integration doc for the configuration option.Configuring with MoEngage SDK or with Application
Check the MoEngage Push integration doc) to configure with MoEngage SDK or if you want to handle it independently. For more information on features provided in MoEngage iOS SDK refer to the following links:- Push Notifications
- Geofence
- In-App messaging
- Notification Center
- Advanced Configuration
- API Reference
- Compliance
- Release Notes
mParticle SDK Usage
Refer to the developer documentation for detailed usage.User Management
User identity is managed through a combination of mParticle’s IDSync framework and MoEngage’s user profiles. Check IDSync documentation from the mParticle developer integration document to manage the user state in the application. By default, our integration automatically maps the following core mParticle identifiers to MoEngage user attributes without any extra code:- customerId
- mobileNumber
Mapping Additional Identifiers
To synchronise other identifiers (e.g., social media IDs, internal aliases), you must explicitly map them using the setMappingForIdentity(), method. This ensures that when an identifier is added or updated through an mParticle setIdentity API call, the change is reflected in the corresponding MoEngage user attribute.When to Call
This setup must be performed at a specific point in your app’s startup sequence:- After you initialize the MoEngage SDK.
- Before you call mParticle’s setIdentity API for the first time.