Skip to content

Commit

Permalink
Release version 1.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyorbin committed Jun 27, 2022
1 parent 171784d commit 6234f96
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 101 deletions.
2 changes: 0 additions & 2 deletions AppboyProject/AppboyProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ class AppboyProject extends Component {
}
});
ReactAppboy.setPhoneNumber('9085555555');
ReactAppboy.setAvatarImageUrl('https://raw.githubusercontent.com/Appboy/appboy-react-sdk/master/braze-logo.png');
ReactAppboy.setEmailNotificationSubscriptionType(ReactAppboy.NotificationSubscriptionTypes.UNSUBSCRIBED);
ReactAppboy.setPushNotificationSubscriptionType(ReactAppboy.NotificationSubscriptionTypes.SUBSCRIBED);
ReactAppboy.addAlias('arrayattr', 'alias-label-1');
Expand Down Expand Up @@ -602,7 +601,6 @@ class AppboyProject extends Component {
ReactAppboy.logContentCardImpression(cardId);
// ReactAppboy.logContentCardDismissed(cardId);
}
ReactAppboy.logContentCardsDisplayed(cardId);
}
}).catch(function () {
console.log("Content Cards Promise Rejected");
Expand Down
30 changes: 15 additions & 15 deletions AppboyProject/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
PODS:
- Appboy-iOS-SDK (4.4.2):
- Appboy-iOS-SDK/UI (= 4.4.2)
- Appboy-iOS-SDK/ContentCards (4.4.2):
- Appboy-iOS-SDK (4.4.4):
- Appboy-iOS-SDK/UI (= 4.4.4)
- Appboy-iOS-SDK/ContentCards (4.4.4):
- Appboy-iOS-SDK/Core
- SDWebImage (< 6, >= 5.8.2)
- Appboy-iOS-SDK/Core (4.4.2)
- Appboy-iOS-SDK/InAppMessage (4.4.2):
- Appboy-iOS-SDK/Core (4.4.4)
- Appboy-iOS-SDK/InAppMessage (4.4.4):
- Appboy-iOS-SDK/Core
- SDWebImage (< 6, >= 5.8.2)
- Appboy-iOS-SDK/NewsFeed (4.4.2):
- Appboy-iOS-SDK/NewsFeed (4.4.4):
- Appboy-iOS-SDK/Core
- SDWebImage (< 6, >= 5.8.2)
- Appboy-iOS-SDK/UI (4.4.2):
- Appboy-iOS-SDK/UI (4.4.4):
- Appboy-iOS-SDK/ContentCards
- Appboy-iOS-SDK/Core
- Appboy-iOS-SDK/InAppMessage
Expand Down Expand Up @@ -226,8 +226,8 @@ PODS:
- React-jsinspector (0.66.4)
- React-logger (0.66.4):
- glog
- react-native-appboy-sdk (1.35.1):
- Appboy-iOS-SDK (~> 4.4.2)
- react-native-appboy-sdk (1.36.0):
- Appboy-iOS-SDK (~> 4.4.4)
- React
- React-perflogger (0.66.4)
- React-RCTActionSheet (0.66.4):
Expand Down Expand Up @@ -296,9 +296,9 @@ PODS:
- React-perflogger (= 0.66.4)
- RNCPicker (2.2.1):
- React-Core
- SDWebImage (5.12.3):
- SDWebImage/Core (= 5.12.3)
- SDWebImage/Core (5.12.3)
- SDWebImage (5.12.6):
- SDWebImage/Core (= 5.12.6)
- SDWebImage/Core (5.12.6)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -410,7 +410,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
Appboy-iOS-SDK: 4a7dfe908639da81e5e85849355f6066b58b4cc6
Appboy-iOS-SDK: b05b957ab645d0a9a43d3f35195ad69202b89edc
boost: a7c83b31436843459a1961bfd74b96033dc77234
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
FBLazyVector: e5569e42a1c79ca00521846c223173a57aca1fe1
Expand All @@ -429,7 +429,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 94ce921e1d8ce7023366873ec371f3441383b396
React-jsinspector: d0374f7509d407d2264168b6d0fad0b54e300b85
React-logger: 933f80c97c633ee8965d609876848148e3fef438
react-native-appboy-sdk: a78720affbaae9a727f1f1da7486c47b3c776bb5
react-native-appboy-sdk: 9f82be787457b1e21ac8b2d54cbbeb82802dd406
React-perflogger: 93075d8931c32cd1fce8a98c15d2d5ccc4d891bd
React-RCTActionSheet: 7d3041e6761b4f3044a37079ddcb156575fb6d89
React-RCTAnimation: 743e88b55ac62511ae5c2e22803d4f503f2a3a13
Expand All @@ -443,7 +443,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: dec32ee6f2e2a26e13e58152271535fadff5455a
ReactCommon: 57b69f6383eafcbd7da625bfa6003810332313c4
RNCPicker: cb57c823d5ce8d2d0b5dfb45ad97b737260dc59e
SDWebImage: 53179a2dba77246efa8a9b85f5c5b21f8f43e38f
SDWebImage: a47aea9e3d8816015db4e523daff50cfd294499d
Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280

PODFILE CHECKSUM: 068da3374f0d37fa26c7066353aaf77e4e493a52
Expand Down
2 changes: 1 addition & 1 deletion AppboyProject/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5178,7 +5178,7 @@ react-is@^16.13.1, react-is@^16.8.4:
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

"react-native-appboy-sdk@file:..":
version "1.35.1"
version "1.36.0"

react-native-codegen@^0.0.7:
version "0.0.7"
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.36.0

##### ⚠ Breaking
- Updated the native Android bridge to [Braze Android SDK 21.0.0](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#2100).
- Updated the native iOS bridge to [Braze iOS SDK 4.4.4](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#444).
- Removed `setAvatarImageUrl()`.
- Removed `logContentCardsDisplayed`. This method was not part of the recommended Content Cards integration and can be safely removed.

# 1.35.1

##### Fixed
Expand All @@ -17,7 +25,7 @@
# 1.34.0

##### ⚠ Breaking
- Updated the native Android bridge to [Braze Android SDK 18.0.1](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#1801git).
- Updated the native Android bridge to [Braze Android SDK 18.0.1](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#1801).

##### Fixed
- Fixed an issue with Content Card types. Thanks @jtparret!
Expand Down
13 changes: 0 additions & 13 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jest.mock('NativeModules', () => {
logPurchase: jest.fn(),
setCountry: jest.fn(),
setHomeCity: jest.fn(),
setAvatarImageUrl: jest.fn(),
setDateOfBirth: jest.fn(),
setTwitterData: jest.fn(),
setFacebookData: jest.fn(),
Expand All @@ -42,7 +41,6 @@ jest.mock('NativeModules', () => {
logContentCardClicked: jest.fn(),
logContentCardDismissed: jest.fn(),
logContentCardImpression: jest.fn(),
logContentCardsDisplayed: jest.fn(),
requestFeedRefresh: jest.fn(),
requestImmediateDataFlush: jest.fn(),
enableSDK: jest.fn(),
Expand Down Expand Up @@ -176,11 +174,6 @@ test('it calls AppboyReactBridge.logContentCardImpression', () => {
expect(NativeModules.AppboyReactBridge.logContentCardImpression).toBeCalledWith(id);
});

test('it calls AppboyReactBridge.logContentCardsDisplayed', () => {
ReactAppboy.logContentCardsDisplayed();
expect(NativeModules.AppboyReactBridge.logContentCardsDisplayed).toBeCalled();
});

test('it calls AppboyReactBridge.requestFeedRefresh', () => {
ReactAppboy.requestFeedRefresh();
expect(NativeModules.AppboyReactBridge.requestFeedRefresh).toBeCalled();
Expand Down Expand Up @@ -231,12 +224,6 @@ test('it calls AppboyReactBridge.requestContentCardsRefresh', () => {
expect(NativeModules.AppboyReactBridge.requestContentCardsRefresh).toBeCalled();
});

test('it calls AppboyReactBridge.setAvatarImageUrl', () => {
const url = "braze.com";
ReactAppboy.setAvatarImageUrl(url);
expect(NativeModules.AppboyReactBridge.setAvatarImageUrl).toBeCalledWith(url);
});

test('it calls AppboyReactBridge.setDateOfBirth', () => {
const year = 2011;
const month = 11;
Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ def safeExtGet(prop, fallback) {
}

android {
compileSdkVersion safeExtGet('compileSdkVersion', 31)
buildToolsVersion safeExtGet('buildToolsVersion', '31.0.0')
compileSdkVersion safeExtGet('compileSdkVersion', 33)
buildToolsVersion safeExtGet('buildToolsVersion', '33.0.0')

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 31)
targetSdkVersion safeExtGet('targetSdkVersion', 33)
versionCode 1
versionName '1.0'
}
Expand All @@ -22,6 +22,6 @@ android {
}

dependencies {
api 'com.appboy:android-sdk-ui:18.0.1'
api 'com.appboy:android-sdk-ui:21.0.0'
api 'com.facebook.react:react-native:+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

import androidx.annotation.NonNull;

import com.appboy.Appboy;
import com.appboy.enums.CardCategory;
import com.appboy.enums.Gender;
import com.appboy.enums.Month;
import com.appboy.enums.NotificationSubscriptionType;
import com.appboy.events.BrazeSdkAuthenticationErrorEvent;
import com.appboy.events.FeedUpdatedEvent;
import com.appboy.events.IEventSubscriber;
import com.appboy.events.SimpleValueCallback;
Expand All @@ -25,6 +23,7 @@
import com.appboy.ui.activities.AppboyFeedActivity;
import com.braze.Braze;
import com.braze.BrazeUser;
import com.braze.events.BrazeSdkAuthenticationErrorEvent;
import com.braze.events.ContentCardsUpdatedEvent;
import com.braze.models.inappmessage.IInAppMessage;
import com.braze.models.inappmessage.IInAppMessageImmersive;
Expand Down Expand Up @@ -432,16 +431,6 @@ public void onSuccess(@NonNull BrazeUser brazeUser) {
});
}

@ReactMethod
public void setAvatarImageUrl(final String avatarImageUrl) {
Braze.getInstance(getReactApplicationContext()).getCurrentUser(new SimpleValueCallback<BrazeUser>() {
@Override
public void onSuccess(@NonNull BrazeUser brazeUser) {
brazeUser.setAvatarImageUrl(avatarImageUrl);
}
});
}

@ReactMethod
public void addToSubscriptionGroup(String groupId, final Callback callback) {
Braze.getInstance(getReactApplicationContext()).getCurrentUser(new SimpleValueCallback<BrazeUser>() {
Expand Down Expand Up @@ -650,9 +639,9 @@ private WritableMap mapContentCard(Card card) {
mappedCard.putDouble("expiresAt", card.getExpiresAt());
mappedCard.putBoolean("viewed", card.getViewed());
mappedCard.putBoolean("clicked", card.isClicked());
mappedCard.putBoolean("pinned", card.getIsPinned());
mappedCard.putBoolean("pinned", card.isPinned());
mappedCard.putBoolean("dismissed", card.isDismissed());
mappedCard.putBoolean("dismissible", card.getIsDismissibleByUser());
mappedCard.putBoolean("dismissible", card.isDismissibleByUser());
mappedCard.putString("url", card.getUrl());
mappedCard.putBoolean("openURLInWebView", card.getOpenUriInWebView());

Expand Down Expand Up @@ -772,16 +761,11 @@ private void updateContentCardsIfNeeded(ContentCardsUpdatedEvent event) {
}
}

@ReactMethod
private void logContentCardsDisplayed() {
Braze.getInstance(getReactApplicationContext()).logContentCardsDisplayed();
}

@ReactMethod
private void logContentCardDismissed(String id) {
Card card = getCardById(id);
if (card != null) {
card.setIsDismissed(true);
card.setDismissed(true);
}
}

Expand Down Expand Up @@ -907,17 +891,17 @@ public void getUnreadCardCountForCategories(String category, Callback callback)

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

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

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

@ReactMethod
Expand Down
10 changes: 0 additions & 10 deletions iOS/AppboyReactBridge/AppboyReactBridge/AppboyReactBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,6 @@ - (NSArray *)parseArray:(NSArray *)array {
[Appboy sharedInstance].user.phone = phone;
}

RCT_EXPORT_METHOD(setAvatarImageUrl:(NSString *)avatarImageURL) {
RCTLogInfo(@"[Appboy sharedInstance].user.avatarImageURL = %@", avatarImageURL);
[Appboy sharedInstance].user.avatarImageURL = avatarImageURL;
}

RCT_EXPORT_METHOD(addToSubscriptionGroup:(NSString *)groupId callback:(RCTResponseSenderBlock)callback) {
RCTLogInfo(@"[Appboy sharedInstance].user addToSubscriptionGroupWithGroupId:groupId: = %@", groupId);
[self reportResultWithCallback:callback andError:nil andResult:@([[Appboy sharedInstance].user addToSubscriptionGroupWithGroupId:groupId])];
Expand Down Expand Up @@ -441,11 +436,6 @@ - (void) getInAppMessageFromString:(NSString *)inAppMessageJSONString withInAppM
}
}

RCT_EXPORT_METHOD(logContentCardsDisplayed) {
RCTLogInfo(@"logContentCardsDisplayed called");
[[Appboy sharedInstance] logContentCardsDisplayed];
}

static NSDictionary *RCTFormatContentCard(ABKContentCard *card) {
NSMutableDictionary *formattedContentCardData = [NSMutableDictionary dictionary];

Expand Down
13 changes: 0 additions & 13 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,6 @@ export function setHomeCity(homeCity: string): void;
*/
export function setPhoneNumber(phoneNumber: string): void;

/**
* Sets the url for the avatar image for the user, which will be displayed on the user profile and throughout
* the Appboy dashboard.
* @param {string} avatarImageUrl
*/
export function setAvatarImageUrl(avatarImageUrl: string): void;

/**
* Sets the date of birth of the user.
* @param {number} year
Expand Down Expand Up @@ -443,12 +436,6 @@ export function logContentCardDismissed(id: string): void;
*/
export function logContentCardImpression(id: string): void;

/**
* When displaying the Content Cards in your own user interface,
* you can manually record Content Cards impressions via the method logContentCardsDisplayed;
*/
export function logContentCardsDisplayed(): void;

/**
* Returns a content cards array
* @returns {Promise<ContentCard[]>}
Expand Down
17 changes: 0 additions & 17 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,6 @@ var ReactAppboy = {
AppboyReactBridge.setPhoneNumber(phoneNumber);
},

/**
* Sets the url for the avatar image for the user, which will be displayed on the user profile and throughout the Appboy
* dashboard.
* @param {string} avatarImageUrl
*/
setAvatarImageUrl: function(avatarImageUrl) {
AppboyReactBridge.setAvatarImageUrl(avatarImageUrl);
},

/**
* Sets the date of birth of the user.
* @param {integer} year
Expand Down Expand Up @@ -554,14 +545,6 @@ var ReactAppboy = {
AppboyReactBridge.logContentCardImpression(id);
},

/**
* When displaying the Content Cards in your own user interface,
* you can manually record Content Cards impressions via the method logContentCardsDisplayed;
*/
logContentCardsDisplayed: function() {
AppboyReactBridge.logContentCardsDisplayed();
},

/**
* Requests a News Feed refresh.
*/
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.35.1",
"version": "1.36.0",
"description": "Braze SDK for React Native.",
"main": "index.js",
"types": "index.d.ts",
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', '~> 4.4.2'
s.dependency 'Appboy-iOS-SDK', '~> 4.4.4'
s.dependency 'React'
end

0 comments on commit 6234f96

Please sign in to comment.