You can use the sample app in the Cordova plug-in to show examples of how to customize and test your mobile app messages.

To use the sample app in the Cordova plug-in:

  1. Download the Cordova package at and change to the samples/Sample folder.
  2. Rename the Android app package id
    1. Modify applications/samples/Sample/config.xml
    a. change widget node’s android-packageName value to your preferred Android package name
    b. change the widget node’s CFBundleIdentifier to your preferred iOS Bundle Identifier
    2. Modify package.json “name” value to match the preferred Android package name
    3. If using FCM copy the google-services.json file to the applications/samples/sample directory
    4. Execute “cordova prepare”
    5. Execute “cordova platform add android”
    6. Execute “cordova platform add ios”
    7. (Continue with normal cordova plugin steps.)

  3. Add the Cordova plug-in by adding the following information (you may not need to add multidex, but if you do then add it before the SDK):
            cordova plugin add plugins/com.xtify.mce.sdk --variable ANDROID_APPKEY= --variable IOS_DEV_APPKEY= --variable IOS_PROD_APPKEY= --variable SERVER_URL=// --variable LOGLEVEL=verbose --variable AUTO_INITIALIZE_LOCATION=false --variable CHANNEL_NAME="Your Channel Name" --variable CHANNEL_DESCRIPTION="Your Channel Description" --variable CHANNEL_ID="YourChannelId" --force 
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.calendar
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.snooze
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.displayweb
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.inbox
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.inapp
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.geofence
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.location --variable SYNC_RADIUS=10000  --variable SYNC_INTERVAL=60
    	cordova plugin add <path to downloaded directory>/plugins/com.xtify.mce.sdk.beacon --variable UUID=<UUID>
    	cordova prepare

    For the SERVER_URL for your pod, go here.

  4. For iOS, perform these steps:
    • In Xcode, go to Project > Target > Capabilities and enable Push Notifications.
    • Open the Xcodeproj file in platforms/ios/<yourprojectname>.xcodeproj. In the iOS sample app, you must change the app ID of the sample app to match the certificate’s app ID after you open it in Xcode.
      Remember: If you do not set your team and provisioning profile, the app will not have permission to get the APNs deviceToken.
  5. For Android, set the ANDROID_HOME variable. For example, export ANDROID_HOME=/Applications/android.
  6. Run the emulator for your sample apps.
  7. Build and run your Android and iOS apps.

Go Back to the Mobile App Messaging home page.

Join The Discussion

Your email address will not be published. Required fields are marked *