Releases: chabokpush/chabok-client-rn
Releases · chabokpush/chabok-client-rn
v1.4.0
- Update Chabok iOS SDK (v1.20.0)
- Update Chabok android SDK (v2.17.0)
- Now Chabok supports user revenue with
trackPurchasemethod. - Now Chabok supports direct/in-direct notification influence.
- Now Chabok supports deferred deep linking with
setDeeplinkCallbackListenermethod. - Add
getUserAttributesandsetUserAttributesmethod. - Add
setDefaultNotificationChannelmethod for changing the default name of notification channel (Android 8 or higher).
Upgrade:
getUserInfoandsetUserInfois deprecated and replaced withgetUserAttributesandsetUserAttributes.
v1.3.0
Changes:
-
Update Chabok iOS SDK (v1.19.0)
-
Update Chabok android SDK (v2.16.0)
-
Add
setUserInfomethod to send user information. -
Add
setDefaultTrackerfor tracking pre-install campaigns. -
Add
appWillOpenUrlmethod for sending attribution information in deeplinks. -
Add
notificationOpenedevent for receiving click on notifications (actions and dismiss). -
Add
registerAsGuestmethod for applications with guest users, and for tracking installs on app launch (just like Adjust).
Upgrade:
- Android:
- Support Google play
INSTALL_REFERRER. Add the following dependency to your gradle.
implementation 'com.android.installreferrer:installreferrer:1.0'- To get notification action, implement the following code in
MainApplicationclass inonCreatemethod:
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (chabok == null) {
chabok = AdpPushClient.init(
getApplicationContext(),
MainActivity.class,
"APP_ID/SENDER_ID",
"API_KEY",
"USERNAME",
"PASSWORD"
);
+ //true connects to Sandbox environment
+ //false connects to Production environment
+ AdpPushClient.get().setDevelopment(DEV_MODE);
+ chabok.addNotificationHandler(new NotificationHandler(){
+ @Override
+ public boolean notificationOpened(ChabokNotification message, ChabokNotificationAction notificationAction) {
+ ChabokReactPackage.notificationOpened(message, notificationAction);
+ return super.notificationOpened(message, notificationAction);
+ }
+ });
}
}
- iOS:
- To get advertising id, add
AdSupport.frameworkto Linked Frameworks and Libraries of your target project - Add
notificationOpened:to send notification action event to React-Native - Add
registerToUNUserNotificationCentermethod to get notification actions by implementing the following code:
(To display rich notification, make sure to read our documentation)
+ @interface AppDelegate ()<PushClientManagerDelegate>
+ @end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
+ [PushClientManager.defaultManager addDelegate:self];
+ [AdpPushClient registerToUNUserNotificationCenter];
...
return true;
}
+ -(void) userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler{
+ [AdpPushClient notificationOpened:response.notification.request.content.userInfo actionId:response.actionIdentifier];
+ }
+ -(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
+ [AdpPushClient notificationOpened:userInfo];
+ }
+ -(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
+ [AdpPushClient notificationOpened:userInfo];
+ }
+ -(void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)())completionHandler{
+ [AdpPushClient notificationOpened:userInfo actionId:identifier];
+ }
v1.2.0
Changes:
- Fix in changing Chabok environment.
Upgrade note:
- For change Chabok environments use
devModeparameter ininitmethod.
init(APP_ID, API_KEY, USERNAME, PASSWORD, DEVMODE) - Remove
appNameparameter ininitializeAppmethod.
initializeApp(options) - The
setDevelopmentmethod is not available anymore. UsedevModeparameter ininitordevModekey ininitializeAppmethod instead
v1.1.1
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
- Add
unregistermethod. - Add
resetBadgemethod issue #11. - Add
addTagsandremoveTagsmethod. - Add a new initializer
initmethod. - Add
getUserIdandgetInstallationIdmethod. - Add
trackmethod for tracking the user interactions. - Add
setDevelopmentmethod to change the Chabok environments. - Fix issues #15 and #6 thanks to @Mr-Hqq
- Fix crash iOS bridge when reloading the JS file.
Upgrade note:
- Change the signature of
unsubscribetounSubscribe. - Change the signature of
publishmethod it gets an object with{'content','userId','channel','data'}.