Skip to content

Commit

Permalink
Release version 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed May 23, 2023
1 parent 827abc5 commit 3a0a8da
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 150 deletions.
1 change: 0 additions & 1 deletion BrazeProject/ios/BrazeProject/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
@interface AppDelegate : RCTAppDelegate <UNUserNotificationCenterDelegate>

@property (nonatomic, strong) UIWindow *window;
@property (nonatomic, strong) RCTBridge* bridge;

@end
11 changes: 8 additions & 3 deletions BrazeProject/ios/BrazeProject/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

@implementation AppDelegate

@synthesize bridge;

static Braze *_braze;

static NSString *const apiKey = @"b7271277-0fec-4187-beeb-3ae6e6fbed11";
Expand All @@ -30,7 +28,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
moduleName:self.moduleName
initialProperties:self.initialProps
launchOptions:launchOptions];
self.bridge = rootView.bridge;

// Configure views in the application
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
Expand Down Expand Up @@ -141,4 +138,12 @@ - (BOOL)concurrentRootEnabled
return false;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end
26 changes: 13 additions & 13 deletions BrazeProject/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PODS:
- boost (1.76.0)
- braze-react-native-sdk (4.0.1):
- BrazeKit (~> 5.13.0)
- BrazeLocation (~> 5.13.0)
- BrazeUI (~> 5.13.0)
- braze-react-native-sdk (5.0.0):
- BrazeKit (~> 6.2.0)
- BrazeLocation (~> 6.2.0)
- BrazeUI (~> 6.2.0)
- React-Core
- BrazeKit (5.13.0)
- BrazeLocation (5.13.0):
- BrazeKit (= 5.13.0)
- BrazeUI (5.13.0):
- BrazeKit (= 5.13.0)
- BrazeKit (6.2.0)
- BrazeLocation (6.2.0):
- BrazeKit (= 6.2.0)
- BrazeUI (6.2.0):
- BrazeKit (= 6.2.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.71.2)
Expand Down Expand Up @@ -590,10 +590,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 57d2868c099736d80fcd648bf211b4431e51a558
braze-react-native-sdk: 2ca459b175c40830094a0a62a591ecc49666bd73
BrazeKit: 97f6875bf05920a46a2f0c9d0e452b6b840c5f99
BrazeLocation: 571ee6bf6b2f5c1aba20d9a75e4da190f8db7e5b
BrazeUI: 31dd9f0235149f05d6f7e37f273be7293e000587
braze-react-native-sdk: 9a9237d785328c97c8dbc1836c3852d52469b5a2
BrazeKit: 23ee5843d5292ebbc468570f14dbe0f02fdd76f1
BrazeLocation: 55378b40acc54e225963b8de9e559c5ce2d30e3f
BrazeUI: 4d51f2e200ce561fbd477f1c2a756dcd2ebb42a4
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: d58428b28fe1f5070fe993495b0e2eaf701d3820
Expand Down
56 changes: 2 additions & 54 deletions BrazeProject/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@braze/react-native-sdk@../":
version "4.0.1"
version "4.1.0"

"@eslint/eslintrc@^1.4.1":
version "1.4.1"
Expand Down Expand Up @@ -1704,11 +1704,6 @@
dependencies:
"@babel/types" "^7.3.0"

"@types/chai@^4.3.4":
version "4.3.4"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.4.tgz#e913e8175db8307d78b4e8fa690408ba6b65dee4"
integrity sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==

"@types/graceful-fs@^4.1.3":
version "4.1.6"
resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae"
Expand Down Expand Up @@ -2081,11 +2076,6 @@ asap@~2.0.6:
resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==

assertion-error@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==

assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
Expand Down Expand Up @@ -2410,19 +2400,6 @@ caniuse-lite@^1.0.30001449:
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz#2e197c698fc1373d63e1406d6607ea4617c613f1"
integrity sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==

chai@^4.3.7:
version "4.3.7"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51"
integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==
dependencies:
assertion-error "^1.1.0"
check-error "^1.0.2"
deep-eql "^4.1.2"
get-func-name "^2.0.0"
loupe "^2.3.1"
pathval "^1.1.1"
type-detect "^4.0.5"

chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
Expand All @@ -2445,11 +2422,6 @@ char-regex@^1.0.2:
resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==

check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==

ci-info@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
Expand Down Expand Up @@ -2727,13 +2699,6 @@ dedent@^0.7.0:
resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==

deep-eql@^4.1.2:
version "4.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d"
integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==
dependencies:
type-detect "^4.0.0"

deep-is@^0.1.3:
version "0.1.4"
resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
Expand Down Expand Up @@ -3490,11 +3455,6 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==

get-func-name@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==

get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3:
version "1.2.0"
resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f"
Expand Down Expand Up @@ -4765,13 +4725,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"

loupe@^2.3.1:
version "2.3.6"
resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53"
integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==
dependencies:
get-func-name "^2.0.0"

lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
Expand Down Expand Up @@ -5583,11 +5536,6 @@ path-type@^4.0.0:
resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==

pathval@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d"
integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==

picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
Expand Down Expand Up @@ -6598,7 +6546,7 @@ type-check@^0.4.0, type-check@~0.4.0:
dependencies:
prelude-ls "^1.2.1"

type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5:
type-detect@4.0.8:
version "4.0.8"
resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 5.0.0

##### Breaking
- Updates the native iOS bridge [from Braze Swift SDK 5.13.0 to 6.2.0](https://github.com/braze-inc/braze-swift-sdk/compare/5.13.0...6.2.0#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR1).
- Removes `setSDKFlavor` and `setMetadata`, which were no-ops starting from version `2.0.0`.
- On iOS, these fields must be set using the `Braze.Configuration` object at SDK initialization.
- On Android, these fields must be set via the `braze.xml` file.

##### Fixed
- Fixes an issue on Android with `getNewsFeedCards()` and `getContentCards()` where promises could be invoked more than once.

##### Added
- Updates the native Android bridge [from Braze Android SDK 24.3.0 to 25.0.0](https://github.com/braze-inc/braze-android-sdk/compare/v24.3.0...v25.0.0#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed).

# 4.1.0

##### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Effective marketing automation is an essential part of successfully scaling and
| 2.0.0+ | >= 0.68 |
| <= 1.41.0 | <= 0.71 |

> Support for React Native 0.69+ (New Architecture) is on the feature roadmap.
> From version 2.0.1 and up, the Braze React Native SDK is compatible with the React Native New Architecture introduced in React Native v0.68+. While our React Native SDK is currently compatible with the New Architecture as a Native Module, we are actively working on converting our Braze library to a backwards compatible Turbo Module and will continue to make improvements for the New Architecture.
## Braze Expo Plugin

Expand Down
4 changes: 0 additions & 4 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ test('it calls BrazeReactBridge.setDateOfBirth', () => {
test('it calls BrazeReactBridge.changeUser', () => {
const user_id = "some_id";
Braze.changeUser(user_id);
expect(NativeModules.BrazeReactBridge.setSDKFlavor).toBeCalled();
expect(NativeModules.BrazeReactBridge.changeUser).toBeCalledWith(user_id, null);
});

Expand All @@ -193,15 +192,12 @@ test('it calls BrazeReactBridge.addAlias', () => {
const aliasLabel = "label";
Braze.addAlias(aliasName, aliasLabel);
expect(NativeModules.BrazeReactBridge.addAlias).toBeCalledWith(aliasName, aliasLabel);
expect(NativeModules.BrazeReactBridge.setSDKFlavor).toBeCalled();
expect(NativeModules.BrazeReactBridge.setMetadata).toBeCalled();
});

test('it calls BrazeReactBridge.logCustomEvent', () => {
const event_name = "event_name";
const event_properties = "event_properties";
Braze.logCustomEvent(event_name, event_properties);
expect(NativeModules.BrazeReactBridge.setSDKFlavor).toBeCalled();
expect(NativeModules.BrazeReactBridge.logCustomEvent).toBeCalledWith(event_name, event_properties);
});

Expand Down
2 changes: 0 additions & 2 deletions __tests__/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jest.mock('react-native', () => {
changeUser: jest.fn(),
setSdkAuthenticationSignature: jest.fn(),
addAlias: jest.fn(),
setSDKFlavor: jest.fn(),
logCustomEvent: jest.fn(),
logPurchase: jest.fn(),
setCountry: jest.fn(),
Expand Down Expand Up @@ -68,7 +67,6 @@ jest.mock('react-native', () => {
logInAppMessageImpression: jest.fn(),
logInAppMessageButtonClicked: jest.fn(),
setLastKnownLocation: jest.fn(),
setMetadata: jest.fn(),
requestPushPermission: jest.fn(),
getFeatureFlag: jest.fn(),
getAllFeatureFlags: jest.fn(),
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {
}

dependencies {
api 'com.appboy:android-sdk-ui:24.3.0'
api 'com.braze:android-sdk-ui:25.0.0'
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.6.0"
}
Loading

0 comments on commit 3a0a8da

Please sign in to comment.