If you've completed the steps described in the Setup guides, you are now ready to implement our Cordova iOS plugin in your app. Easily integrate Notificare in your app by using the Command-Line interface. In this document we assume you already have a recent version of Apache Cordova, but you should at least have Cordova 6.0 or higher.

Add the Plugin

To install the plugin, open your terminal and in the root of your project, type the following:

cordova plugin add cordova-plugin-notificare-push

This will make sure you have the latest Notificare library and required iOS frameworks.

Add a Notificare Configuration file

In order to connect your app to Notificare, you must create a file Notificare.plist, in platforms/ios/YOUR_APP_NAME_HERE/Resources/, with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

It is recommended that you create at least two different apps in Notificare using separated environments for development and production. For each app you will have a different set of keys, these keys should be copied and pasted in the file shown above. You can find your app keys by expanding your app's Settings menu item and clicking in App Keys as shown below:


Copy both the Application Key and Application Secret:


Initial Implementation

The most common place to instantiate our plugin is to use Cordova's onDeviceReady method. Open your .js file in www add the following code as shown below:

onDeviceReady: function() {
    ..more code

At this point, you have completed the basic setup of our library. Keep reading our implementation guides to dive deeper into each features available in our SDK.