Netmera iOS SDK for Netmera mobile app engagement platform
Know & understand your app users, send them targeted push notification & popup campaigns, and analyze results with Netmera! Netmera iOS SDK provides you set of tools to work seamlessly with Netmera User Engagement platform. For details, please see https://developer.netmera.com
Netmera will be compatible with the lastest public release of Swift.
- iOS 9.0+
- Xcode 11.0+
Analytics is available through CocoaPods and Carthage.
pod "Netmera"
For NotificationServiceExtension
pod "Netmera/NotificationServiceExtension"
For NotificationContentExtension
pod "Netmera/NotificationContentExtension"
For Without AdId Support
pod 'Netmera/NetmeraWithoutAdId'
In Xcode, select File > Add Packages..
Enter the package URL for this repository https://github.com/Netmera/netmera-ios.git.
// TODO: Feature
See Netmera's iOS SDK API
in Swift
import Netmera
didFinishLaunchingWithOptions
in AppDelegate
Netmera.start()
Netmera.setBaseURL("{BASE_URL}") // Optional
Netmera.setAPIKey("{apiKey}")
Netmera.setAppGroupName("{app.group.name}") // Optional if you want use notification content extension
// Request notifcation authorization.
Netmera.requestPushNotificationAuthorization(forTypes: [.alert, .sound, .badge])
Netmera.setLogLevel(NetmeraLogLevel.debug)
in Objective-c
#import <Netmera/Netmera.h>
didFinishLaunchingWithOptions
in AppDelegate
[Netmera setLogLevel:NetmeraLogLevelDebug];
[Netmera start];
[Netmera setAPIKey:@"{API_KEY}"];
[Netmera setBaseURL:@"{BASE_URL}"]; // Optional
[Netmera setAppGroupName:@"app.group.name"]; // Optional if you want use notification content extension
It will stop/start all events and user update request.
Stop
[Netmera stopDataTransfer];
Start
[Netmera startDataTransfer];
Fetch category preferences of the user. It will return category preference list. Each category preference data includes id, name and enable status.
Netmera.getUserCategoryPreferenceList { categories, error in
if let categories = categories {
print(categories)
} else if let error = error {
print(error)
}
}
Manage preference of category. To switch preference status of category with given id.
Netmera.setUserCategoryPreferenceWithCategoryId("{categoryId}", categoryEnabled: {true/false}) { error in
...
}
See Netmera's iOS SDK Change Log.
Netmera is distributed under the Apache license. See LICENSE for details.