Netmera iOS SDK V2.4 released!

We are happy to announce that Netmera iOS SDK V2.4 has been released.

A major update is that you will be able to send Interactive Push Notifications to your iOS 8 devices! Moreover, we provide the NMPushManagerDelegate protocol to make you handle push notifications in a more convenient way. We also updated our NMLocationManager class to get location updates correctly in iOS 8 devices, together with minor stability and performance improvements. Lastly, from now on, you can easily localize all the strings used by the SDK using NetmeraLocalization.strings file.

Let’s dive into deep:

Interactive Push Notifications

Enabling interactive push notifications for your device is very simple. You only need to call [NMPushManager setUserNotificationCategories:] method with an NSSet containing UIUserNotificationCategory objects. Netmera will automatically register the app for given categories, and synchronize Netmera panel with your button sets. Here is a simple example that you can call in any place (application:didFinishLaunchingWithOptions: is the recommended place):

When an interactive push notification is received and a user selected an action button, handleActionForPush:appState:completionHandler: delegate method will be called. Here is an example implementation:

Getting Location Authorization on iOS8 Devices

Core Location service API has received a major change about getting users’ permission on iOS 8. There are two authorisation types:

– AlwaysAuthorization : Requests permission to always use location services  (when the app is either in background or foreground or not running).

– WhenInUseAuthorization :  Requests permission to use location services while the app is in the foreground.

There is a simple step that you must take in order to allow Netmera to get location updates in iOS 8 devices. You only have to put one of the NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription keys with proper description text strings. These texts will be prompted to users when requesting location permission.

Netmera will automatically call needed authorization request methods by checking the key that you put into your application’s Info.plist file.

Note: NSLocationAlwaysUsageDescription key will have precedence over NSLocationWhenInUseUsageDescription key. In other words, if you give both keys to the Info.plist file, users will be asked to always give an authorisation.

NMPushManagerDelegate Protocol

NMPushManagerDelegate protocol declares convenient methods to handle coming push notifications. You should implement these methods to have advanced control over push notification handling process.

IMPORTANT NOTE: Currently, if a push notification sent from Netmera is received, default remote notification delegate methods are also called in addition to NMPushManagerDelegate protocol methods. This behavior will be changed in the next major release! If the push notification is sent via Netmera, only NMPushManagerDelegate methods will be called. Therefore, you should update your code and start to use NMPushManagerDelegate methods to manage push notifications coming from Netmera.

Following are the methods and their explanations:

Localizing Netmera Interfaces

From now on, you can easily localize strings used by Netmera SDK using NetmeraLocalization.strings file which is in the NetmeraSDK/Resources folder. Here is the content of the file:

By default, there is only one file containing English texts. However, you can localize this file in any number of languages you want using Xcode’s Localization feature. Also, if your app will use just one language which is not English, you can change the values in the NetmeraLocalization.strings file, without creating localized versions.


0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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