Skip to content

Commit

Permalink
Release version 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bucimis committed Apr 6, 2018
1 parent e02ebb7 commit 27510d7
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 53 deletions.
24 changes: 24 additions & 0 deletions AppboyProject/AppboyProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@ class AppboyProject extends Component {
onPress={this._requestImmediateDataFlush}>
<Text>Request Immediate Data Flush</Text>
</TouchableHighlight>
<TouchableHighlight
onPress={this._wipeData}>
<Text>Wipe Data</Text>
</TouchableHighlight>
<TouchableHighlight
onPress={this._disableSDK}>
<Text>Disable SDK</Text>
</TouchableHighlight>
<TouchableHighlight
onPress={this._enableSDK}>
<Text>Enable SDK</Text>
</TouchableHighlight>
</View>
);
}
Expand Down Expand Up @@ -302,6 +314,18 @@ class AppboyProject extends Component {
_requestImmediateDataFlush(event) {
ReactAppboy.requestImmediateDataFlush();
}

_wipeData(event) {
ReactAppboy.wipeData();
}

_disableSDK(event) {
ReactAppboy.disableSDK();
}

_enableSDK(event) {
ReactAppboy.enableSDK();
}
}

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion AppboyProject/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target 'AppboyProject' do
platform :ios, '8.0'
pod 'Appboy-iOS-SDK'
pod 'Appboy-iOS-SDK', ‘3.3.3
end
24 changes: 12 additions & 12 deletions AppboyProject/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
PODS:
- Appboy-iOS-SDK (3.3.2):
- Appboy-iOS-SDK/UI (= 3.3.2)
- Appboy-iOS-SDK/Core (3.3.2)
- Appboy-iOS-SDK/Feedback (3.3.2):
- Appboy-iOS-SDK (3.3.3):
- Appboy-iOS-SDK/UI (= 3.3.3)
- Appboy-iOS-SDK/Core (3.3.3)
- Appboy-iOS-SDK/Feedback (3.3.3):
- Appboy-iOS-SDK/Core
- Appboy-iOS-SDK/InAppMessage (3.3.2):
- Appboy-iOS-SDK/InAppMessage (3.3.3):
- Appboy-iOS-SDK/Core
- SDWebImage/GIF (~> 4.0)
- Appboy-iOS-SDK/UI (3.3.2):
- Appboy-iOS-SDK/UI (3.3.3):
- Appboy-iOS-SDK/Core
- Appboy-iOS-SDK/Feedback
- Appboy-iOS-SDK/InAppMessage
- FLAnimatedImage (1.0.12)
- SDWebImage/Core (4.3.0)
- SDWebImage/GIF (4.3.0):
- SDWebImage/Core (4.3.3)
- SDWebImage/GIF (4.3.3):
- FLAnimatedImage (~> 1.0)
- SDWebImage/Core

DEPENDENCIES:
- Appboy-iOS-SDK
- Appboy-iOS-SDK (= 3.3.3)

SPEC CHECKSUMS:
Appboy-iOS-SDK: edd999ec1622a72b8ab5f5cabcc2887dd1ca18f3
Appboy-iOS-SDK: e0114384b8025253456b8d4222c757b60f08c223
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
SDWebImage: 6da6c8bca115addc4de8613362e1b15f66333825
SDWebImage: de4d90b5bff3571eae7bd16202b1f43135409fa5

PODFILE CHECKSUM: 6f16fd22978313a439eb0c3db2e35be41af25a47
PODFILE CHECKSUM: 86e0f7238e73df43f4e88a4119e435927090b527

COCOAPODS: 1.4.0
47 changes: 32 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 1.6.0

##### Breaking
- Updated the native iOS bridge to [Braze iOS SDK 3.3.3](https://github.com/Appboy/appboy-ios-sdk/releases/tag/3.3.3) or later.
- Updated the native Android bridge to [Braze Android SDK 2.2.5](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#225).

##### Added
- Added support for wiping all customer data created by the Braze SDK via `Appboy.wipeData()`.
- Note that on iOS, `wipeData()` will disable the SDK for the remainder of the app run. For more information, see our iOS SDK's documentation for [`disableSDK`](http://appboy.github.io/appboy-ios-sdk/docs/interface_appboy.html#a8d3b78a98420713d8590ed63c9172733).
- Added `Appboy.disableSDK()` to disable the Braze SDK immediately.
- Added `Appboy.enableSDK()` to re-enable the SDK after a call to `Appboy.disableSDK()`.
- Note that on iOS, `enableSDK()` will not enable the SDK immediately. For more information, see our iOS SDK's documentation for [`requestEnableSDKOnNextAppRun`](http://appboy.github.io/appboy-ios-sdk/docs/interface_appboy.html#a781078a40a3db0de64ac82dcae3b595b).

##### Changed
- Removed `allowBackup` from the plugin `AndroidManifest.xml`.
- See https://github.com/Appboy/appboy-react-sdk/pull/34. Thanks @SMJ93!

## 1.5.2

##### Fixed
Expand All @@ -11,8 +28,8 @@
## 1.5.0

##### Breaking
- Updated the native iOS bridge to [Appboy iOS SDK 3.0.0](https://github.com/Appboy/appboy-ios-sdk/releases/tag/3.0.0) or later.
- Updated the native Android bridge to [Appboy Android SDK 2.2.4](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#224).
- Updated the native iOS bridge to [Braze iOS SDK 3.0.0](https://github.com/Appboy/appboy-ios-sdk/releases/tag/3.0.0) or later.
- Updated the native Android bridge to [Braze Android SDK 2.2.4](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#224).
- Changed success callbacks on `submitFeedback()` on Android to always return `true` as `submitFeedback()` was changed to return `void` in the native SDK.

## 1.4.1
Expand All @@ -24,11 +41,11 @@
## 1.4.0

##### Breaking
- Updated the native iOS bridge to [Appboy iOS SDK 2.31.0](https://github.com/Appboy/appboy-ios-sdk/releases/tag/2.31.0) or later.
- Updated the native Android bridge to [Appboy Android SDK 2.1.4](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#214).
- Updated the native iOS bridge to [Braze iOS SDK 2.31.0](https://github.com/Appboy/appboy-ios-sdk/releases/tag/2.31.0) or later.
- Updated the native Android bridge to [Braze Android SDK 2.1.4](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#214).

##### Added
- Added `ReactAppboy.registerPushToken()` for registering push tokens with Appboy.
- Added `ReactAppboy.registerPushToken()` for registering push tokens with Braze.
- See https://github.com/Appboy/appboy-react-sdk/pull/13. Thanks @dcvz!
- Added the local `react-native-appboy-sdk` Podspec for integrating the React Native iOS bridge via Cocoapods.
- See the new `HelloReact` sample app for an integration example.
Expand All @@ -37,11 +54,11 @@
## 1.3.0

##### Breaking
- Updates the native iOS bridge to use [Appboy iOS SDK 2.29.0](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#2290), which drops support for iOS 7.
- Updates the native Android bridge to use [Appboy Android SDK 2.0.0](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#200).
- Updates the native iOS bridge to use [Braze iOS SDK 2.29.0](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#2290), which drops support for iOS 7.
- Updates the native Android bridge to use [Braze Android SDK 2.0.0](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#200).

##### Added
- Adds `ReactAppboy.requestImmediateDataFlush()` for requesting an immediate flush of any data waiting to be sent to Appboy's servers.
- Adds `ReactAppboy.requestImmediateDataFlush()` for requesting an immediate flush of any data waiting to be sent to Braze's servers.
- Adds `ReactAppboy.requestFeedRefresh()` for requesting a refresh of the News Feed.
- See https://github.com/Appboy/appboy-react-sdk/pull/12. Thanks @stief510!
- Added the ability to pass an optional dictionary of News Feed launch options to `launchNewsFeed()`. See `NewsFeedLaunchOptions` for supported keys.
Expand All @@ -59,14 +76,14 @@
## 1.1.0

##### Breaking
- **Update Required** — Fixes a bug in the [iOS bridge](https://github.com/Appboy/appboy-react-sdk/blob/master/iOS/AppboyReactBridge/AppboyReactBridge/AppboyReactBridge.m) where custom attribute dates were converted incorrectly, causing incorrect date data to be sent to Appboy. As a result of the fix, `setDateCustomUserAttribute()` in the iOS Appboy React bridge may now only be called with a double.
- Note: The default Javascript Appboy interface has not changed, so for most integrations this just requires updating the SDK, unless you were manually calling our iOS bridge outside of our recommended integration.
- **Update Required** — Fixes a bug in the [iOS bridge](https://github.com/Appboy/appboy-react-sdk/blob/master/iOS/AppboyReactBridge/AppboyReactBridge/AppboyReactBridge.m) where custom attribute dates were converted incorrectly, causing incorrect date data to be sent to Braze. As a result of the fix, `setDateCustomUserAttribute()` in the iOS React bridge may now only be called with a double.
- Note: The default Javascript Braze interface has not changed, so for most integrations this just requires updating the SDK, unless you were manually calling our iOS bridge outside of our recommended integration.
- See https://github.com/Appboy/appboy-react-sdk/issues/7

## 1.0.0

##### Breaking
- **Update Required** — Updates iOS push handling in the AppboyProject sample project to be compatible with iOS 10. For more information, refer to the CHANGELOG for [Appboy iOS SDK v2.24.0](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#2240).
- **Update Required** — Updates iOS push handling in the AppboyProject sample project to be compatible with iOS 10. For more information, refer to the CHANGELOG for [Braze iOS SDK v2.24.0](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#2240).

##### Added
- Adds callbacks to the native bindings to provide function call results to React Native.
Expand All @@ -77,12 +94,12 @@
- See https://github.com/Appboy/appboy-react-sdk/issues/4

##### Changed
- Targets [Appboy Android SDK version 1.15.3](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#1153) and [Appboy iOS SDK version 2.24.2](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#2242).
- Targets [Braze Android SDK version 1.15.3](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#1153) and [Braze iOS SDK version 2.24.2](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#2242).
- Updates the AppboyProject sample application to React Native v0.33.0.
- Updates the AppboyProject sample project to integrate session handling and in-app message manager registration using an [AppboyLifecycleCallbackListener](https://github.com/Appboy/appboy-android-sdk/blob/master/android-sdk-ui/src/com/appboy/AppboyLifecycleCallbackListener.java), as introduced in Appboy Android SDK v1.15.0.
- Updates the AppboyProject sample project to integrate session handling and in-app message manager registration using an [AppboyLifecycleCallbackListener](https://github.com/Appboy/appboy-android-sdk/blob/master/android-sdk-ui/src/com/appboy/AppboyLifecycleCallbackListener.java), as introduced in Braze Android SDK v1.15.0.

##### Removed
- Removes `AppboyBroadcastReceiver.java` from the AppboyProject sample project, as Appboy Android SDK v1.15.0 removes the need for a custom `AppboyBroadcastReceiver` for Appboy push notifications.
- Removes `AppboyBroadcastReceiver.java` from the AppboyProject sample project, as Braze Android SDK v1.15.0 removes the need for a custom `AppboyBroadcastReceiver` for Braze push notifications.

## 0.3.0

Expand All @@ -95,4 +112,4 @@
- Refactors Android module to have the source directly under the `android` folder.

## 0.1.0
- Initial release. Targets Appboy Android SDK version 1.12.0 and Appboy iOS SDK Version 1.18.4.
- Initial release. Targets Braze Android SDK version 1.12.0 and Braze iOS SDK Version 1.18.4.
32 changes: 16 additions & 16 deletions HelloReact/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
PODS:
- Appboy-iOS-SDK (3.3.2):
- Appboy-iOS-SDK/UI (= 3.3.2)
- Appboy-iOS-SDK/Core (3.3.2)
- Appboy-iOS-SDK/Feedback (3.3.2):
- Appboy-iOS-SDK (3.3.3):
- Appboy-iOS-SDK/UI (= 3.3.3)
- Appboy-iOS-SDK/Core (3.3.3)
- Appboy-iOS-SDK/Feedback (3.3.3):
- Appboy-iOS-SDK/Core
- Appboy-iOS-SDK/InAppMessage (3.3.2):
- Appboy-iOS-SDK/InAppMessage (3.3.3):
- Appboy-iOS-SDK/Core
- SDWebImage/GIF (~> 4.0)
- Appboy-iOS-SDK/UI (3.3.2):
- Appboy-iOS-SDK/UI (3.3.3):
- Appboy-iOS-SDK/Core
- Appboy-iOS-SDK/Feedback
- Appboy-iOS-SDK/InAppMessage
- FLAnimatedImage (1.0.12)
- React (0.53.3):
- React/Core (= 0.53.3)
- react-native-appboy-sdk (1.4.0):
- Appboy-iOS-SDK (~> 3.0)
- react-native-appboy-sdk (1.5.2):
- Appboy-iOS-SDK (~> 3.3.3)
- React
- React/Core (0.53.3):
- yoga (= 0.53.3.React)
Expand All @@ -33,8 +33,8 @@ PODS:
- React/Core
- React/fishhook
- React/RCTBlob
- SDWebImage/Core (4.3.0)
- SDWebImage/GIF (4.3.0):
- SDWebImage/Core (4.3.3)
- SDWebImage/GIF (4.3.3):
- FLAnimatedImage (~> 1.0)
- SDWebImage/Core
- yoga (0.53.3.React)
Expand All @@ -57,13 +57,13 @@ EXTERNAL SOURCES:
:path: ../node_modules/react-native/ReactCommon/yoga

SPEC CHECKSUMS:
Appboy-iOS-SDK: edd999ec1622a72b8ab5f5cabcc2887dd1ca18f3
Appboy-iOS-SDK: e0114384b8025253456b8d4222c757b60f08c223
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
React: fd20e9486c9d994fb6e40d6e67dbd29c7709889c
react-native-appboy-sdk: 9eff45df27ad1726518f19a9ab71a9c9ea343a12
SDWebImage: 6da6c8bca115addc4de8613362e1b15f66333825
yoga: c7c8e64dbc2552b1ceac0b491ff03f5e5128b501
React: af66244a7d630be2aef03b4ddfe3570e4eff39fc
react-native-appboy-sdk: 8838ae4baf86f01a5bdb6f6044bfb3f73095a26b
SDWebImage: de4d90b5bff3571eae7bd16202b1f43135409fa5
yoga: 55da126afc384965b96bff46652464373b330add

PODFILE CHECKSUM: 83ab0c1e4052d87bd06d28280828f7138834ef5c

COCOAPODS: 1.3.1
COCOAPODS: 1.4.0
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ android {
}

dependencies {
compile 'com.appboy:android-sdk-ui:2.2.4'
compile 'com.appboy:android-sdk-ui:2.2.5'
compile 'com.facebook.react:react-native:0.19.+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ private void getCardCountForTag(final String category, final Callback callback,
// Register FeedUpdatedEvent subscriber
IEventSubscriber<FeedUpdatedEvent> feedUpdatedSubscriber = null;
boolean requestingFeedUpdateFromCache = false;
final Appboy mAppboy = Appboy.getInstance(getReactApplicationContext());

if (cardCountTag.equals(CARD_COUNT_TAG)) {
// getCardCount
Expand All @@ -410,7 +409,7 @@ public void trigger(FeedUpdatedEvent feedUpdatedEvent) {
}
}
// Remove this listener from the feed subscriber map and from Appboy
mAppboy.removeSingleSubscription(mFeedSubscriberMap.get(callback), FeedUpdatedEvent.class);
Appboy.getInstance(getReactApplicationContext()).removeSingleSubscription(mFeedSubscriberMap.get(callback), FeedUpdatedEvent.class);
mFeedSubscriberMap.remove(callback);
}
};
Expand All @@ -432,7 +431,7 @@ public void trigger(FeedUpdatedEvent feedUpdatedEvent) {
}
}
// Remove this listener from the feed subscriber map and from Appboy
mAppboy.removeSingleSubscription(mFeedSubscriberMap.get(callback), FeedUpdatedEvent.class);
Appboy.getInstance(getReactApplicationContext()).removeSingleSubscription(mFeedSubscriberMap.get(callback), FeedUpdatedEvent.class);
mFeedSubscriberMap.remove(callback);
}
};
Expand All @@ -442,8 +441,8 @@ public void trigger(FeedUpdatedEvent feedUpdatedEvent) {
if (requestingFeedUpdateFromCache) {
// Put the subscriber into a map so we can remove it later from future subscriptions
mFeedSubscriberMap.put(callback, feedUpdatedSubscriber);
mAppboy.subscribeToFeedUpdates(feedUpdatedSubscriber);
mAppboy.requestFeedRefreshFromCache();
Appboy.getInstance(getReactApplicationContext()).subscribeToFeedUpdates(feedUpdatedSubscriber);
Appboy.getInstance(getReactApplicationContext()).requestFeedRefreshFromCache();
}
}

Expand All @@ -462,6 +461,21 @@ public void launchFeedback() {
Log.i(TAG, "Launch feedback actions are not currently supported on Android. Doing nothing.");
}

@ReactMethod
public void wipeData() {
Appboy.wipeData(getReactApplicationContext());
}

@ReactMethod
public void disableSDK() {
Appboy.disableSdk(getReactApplicationContext());
}

@ReactMethod
public void enableSDK() {
Appboy.enableSdk(getReactApplicationContext());
}

private Month parseMonth(int monthInt) {
switch (monthInt) {
case 1:
Expand Down
14 changes: 13 additions & 1 deletion iOS/AppboyReactBridge/AppboyReactBridge/AppboyReactBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,19 @@ - (ABKCardCategory)getCardCategoryForString:(NSString *)category {
RCT_EXPORT_METHOD(requestFeedRefresh) {
[[Appboy sharedInstance] requestFeedRefresh];
}


RCT_EXPORT_METHOD(wipeData) {
[Appboy wipeDataAndDisableForAppRun];
}

RCT_EXPORT_METHOD(disableSDK) {
[Appboy disableSDK];
}

RCT_EXPORT_METHOD(enableSDK) {
[Appboy requestEnableSDKOnNextAppRun];
}

RCT_EXPORT_METHOD(getCardCountForCategories:(NSString *)category callback:(RCTResponseSenderBlock)callback) {
ABKCardCategory cardCategory = [self getCardCategoryForString:category];
if (cardCategory == 0) {
Expand Down
23 changes: 23 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,29 @@ var ReactAppboy = {
AppboyReactBridge.requestImmediateDataFlush();
},

// Data Controls
/**
* Wipes Data on the Braze SDK. On iOS, the SDK will be disabled for the rest of the app run.
*/
wipeData: function() {
AppboyReactBridge.wipeData();
},

/**
* Disables the Braze SDK immediately.
*/
disableSDK: function() {
AppboyReactBridge.disableSDK();
},

/**
* Enables the Braze SDK after a previous call to disableSDK().
* On iOS, the SDK will be enabled only after a subsequent call to startWithApiKey().
*/
enableSDK: function() {
AppboyReactBridge.enableSDK();
},

// Enums
CardCategory: {
'ADVERTISING': 'advertising',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-appboy-sdk",
"version": "1.5.2",
"version": "1.6.0",
"description": "Braze SDK for React Native.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion react-native-appboy-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Pod::Spec.new do |s|
s.preserve_paths = 'LICENSE.md', 'README.md', 'package.json', 'index.js'
s.source_files = 'iOS/**/*.{h,m}'

s.dependency 'Appboy-iOS-SDK', '~> 3.0'
s.dependency 'Appboy-iOS-SDK', '~> 3.3.3'
s.dependency 'React'
end

0 comments on commit 27510d7

Please sign in to comment.