Skip to content

How to start Example application

Alexander Boldyrev edited this page Nov 8, 2022 · 1 revision

How to start Example application 3.x version

For Mobile Messaging Plugin we've provided an Example app, which can be easily setup and started with your credentials:

  1. Copy-paste example folder outside of plugin folder (sometimes it may cause unexpected errors if example project folder is inside plugin folder)
  2. Provide your application code in /example/www/js/app.js
var APP_CODE = <your application code>;
  1. Add plugin cordova plugin add com-infobip-plugins-mobilemessaging
  2. Provide IOS_EXTENSION_APP_CODE, IOS_EXTENSION_APP_GROUP to be able to add notification service extension automatically and ANDROID_FIREBASE_SENDER_ID in /example/config.xml.
    <plugin name="com-infobip-plugins-mobilemessaging" spec="...">
        <variable name="IOS_EXTENSION_APP_CODE" value="application code" />
        <variable name="IOS_EXTENSION_APP_GROUP" value="extension app group" />
        <variable name="ANDROID_FIREBASE_SENDER_ID" value="sender id"/>
    </plugin>
  1. Add platforms, for iOS you will need to have ruby version 2.3.8 with oldest version could be errors
  • cordova platform add android
  • cordova platform add ios
  1. To complete setup for iOS you need to open Xcode and select your development team for signing the app for Example and MobileMessagingNotificationExtension targets
xCode Signing

If you want to change bundle id, you could change widget id in /example/config.xml and rebuild ios platform

Clone this wiki locally