Skip to content

[3.x] How to start Example application

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

How to start Example application 2.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 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" />
    </plugin>
  1. Get the Firebase configuration file (google-services.json) as described in Firebase documentation and put it to the root application folder.

  2. 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