From 0b7bd06050369157c0108b858a40016009ca747f Mon Sep 17 00:00:00 2001 From: wesleyorbin Date: Wed, 29 Mar 2023 16:44:25 -0400 Subject: [PATCH] Release version 1.1.1 --- CHANGELOG.md | 7 +++- README.md | 4 +-- example/components/Braze.tsx | 2 +- example/package.json | 2 +- example/yarn.lock | 33 +++++++++++++------ .../ExpoAdapterBraze/BrazeAppDelegate.swift | 3 ++ plugin/package.json | 2 +- 7 files changed, 37 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0097c50..56bc4cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.1.1 + +##### Fixed +- Fixed an issue where `Braze.getInitialUrl()` could incorrectly return `null`. + # 1.1.0 ##### ⚠ Breaking @@ -10,7 +15,7 @@ # 1.0.1 ##### Fixed -- Fixes an issue introduced in 1.0.0 where setting `enableAutoLocationCollection` to any value in `app.json` would enable the option on iOS. +- Fixed an issue introduced in 1.0.0 where setting `enableAutoLocationCollection` to any value in `app.json` would enable the option on iOS. # 1.0.0 diff --git a/README.md b/README.md index 884a3da..319c839 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,6 @@ This Expo Config plugin auto configures the [`Braze React Native SDK`](https://w | Braze Expo Plugin | Braze React Native SDK | | ----------------- | ---------------------- | -| 1.1.0 | >= 2.1.0 | -| 1.0.0 - 1.0.1 | >= 2.0.2 | +| >=1.1.0 | >= 2.1.0 | +| 1.0.0 - 1.0.1 | >= 2.0.2 | | <= 0.6.0 | 1.38.0 - 1.41.0 | diff --git a/example/components/Braze.tsx b/example/components/Braze.tsx index ef23f4b..68f0114 100644 --- a/example/components/Braze.tsx +++ b/example/components/Braze.tsx @@ -77,7 +77,7 @@ export const BrazeComponent = (): ReactElement => { // Handles deep links when an iOS app is launched from hard close via push click. // Note that this isn't handled by Linking.getInitialURL(), as the app is // launched not from a deep link, but from clicking on the push notification. - // For more detail, see `Braze.getInitialURL` in `index.js`. + // For more detail, see `Braze.getInitialURL` in the React Native SDK. Braze.getInitialURL(url => { if (url) { console.log('Braze.getInitialURL is ' + url); diff --git a/example/package.json b/example/package.json index 65e4230..2a7a068 100644 --- a/example/package.json +++ b/example/package.json @@ -21,7 +21,7 @@ "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", - "expo": "~48.0.4", + "expo": "~48.0.6", "expo-asset": "~8.9.0", "expo-constants": "~14.2.1", "expo-font": "~11.1.1", diff --git a/example/yarn.lock b/example/yarn.lock index 2548e33..3d06538 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -3712,6 +3712,19 @@ expo-asset@~8.9.0: path-browserify "^1.0.0" url-parse "^1.5.9" +expo-asset@~8.9.1: + version "8.9.1" + resolved "https://registry.npmjs.org/expo-asset/-/expo-asset-8.9.1.tgz#ecd43d7e8ee879e5023e7ce9fbbd6d011dcaf988" + integrity sha512-ugavxA7Scn96TBdeTYQA6xtHktnk0o/0xk7nFkxJKoH/t2cZDFSB05X0BI2/LDZY4iE6xTPOYw4C4mmourWfuA== + dependencies: + blueimp-md5 "^2.10.0" + expo-constants "~14.2.0" + expo-file-system "~15.2.0" + invariant "^2.2.4" + md5-file "^3.2.3" + path-browserify "^1.0.0" + url-parse "^1.5.9" + expo-constants@~14.2.0, expo-constants@~14.2.1: version "14.2.1" resolved "https://registry.npmjs.org/expo-constants/-/expo-constants-14.2.1.tgz#b5b6b8079d2082c31ccf2cbc7cf97a0e83c229c3" @@ -3761,10 +3774,10 @@ expo-modules-autolinking@1.1.2: find-up "^5.0.0" fs-extra "^9.1.0" -expo-modules-core@1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-1.2.3.tgz#03943710f09120d9b60200fac377bfabcc010890" - integrity sha512-bYWxL60NPzDTuvlBrNLlwu7K6H7GqlRKJJpF1c3lqHsMw9vusu3StHZhAXB2noMPD+Ww/pGa/A9tfTtieqvbcg== +expo-modules-core@1.2.5: + version "1.2.5" + resolved "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-1.2.5.tgz#3f9166f4c32c68ab8ef3e120c70ce9890b711650" + integrity sha512-5pXNlLHNKLayOusAFMbqr27gjgymHuKuWl/Dtbw2MjoyJY1MZCGD2nIJxd1TTcfnyxNxLg6OQmgkyqoBUFqBuw== dependencies: compare-versions "^3.4.0" invariant "^2.2.4" @@ -3798,10 +3811,10 @@ expo-web-browser@~12.1.1: compare-urls "^2.0.0" url "^0.11.0" -expo@~48.0.4: - version "48.0.4" - resolved "https://registry.npmjs.org/expo/-/expo-48.0.4.tgz#de3be9695edb422a49c7734b2bde82f2caad668d" - integrity sha512-FGxaxqI8u0r3CvFQAEx/kpqZP4cA7q9ymMoIrrjtOsWvKsuk5Dt3gLEJpymGp6aicPuDXn3xBxo2dsRZF5NkUw== +expo@~48.0.6: + version "48.0.7" + resolved "https://registry.npmjs.org/expo/-/expo-48.0.7.tgz#7900bfda316d25127ed9c412daa31db66dc4a869" + integrity sha512-4sPW+HWm03z72FKIG9IddwEhF9+RlAUsTh8pnsoZjZbXALVikmV3QjD4zp/Dkt9YuiCAnJN1VBaT2AlhbYk2Rg== dependencies: "@babel/runtime" "^7.20.0" "@expo/cli" "0.6.2" @@ -3811,13 +3824,13 @@ expo@~48.0.4: babel-preset-expo "~9.3.0" cross-spawn "^6.0.5" expo-application "~5.1.1" - expo-asset "~8.9.0" + expo-asset "~8.9.1" expo-constants "~14.2.1" expo-file-system "~15.2.2" expo-font "~11.1.1" expo-keep-awake "~12.0.1" expo-modules-autolinking "1.1.2" - expo-modules-core "1.2.3" + expo-modules-core "1.2.5" fbemitter "^3.0.0" getenv "^1.0.0" invariant "^2.2.4" diff --git a/plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift b/plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift index 768487a..76ca42b 100644 --- a/plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift +++ b/plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift @@ -70,6 +70,8 @@ public class BrazeAppDelegate: ExpoAppDelegateSubscriber { let braze = BrazeReactBridge.perform(#selector(BrazeReactBridge.initBraze(_:)), with: configuration).takeUnretainedValue() as! Braze BrazeAppDelegate.braze = braze + BrazeReactUtils.sharedInstance().populateInitialUrl(fromLaunchOptions: launchOptions) + if let useBrazePush = plistConfig["UseBrazePush"] as? Bool, useBrazePush { application.registerForRemoteNotifications() let center = UNUserNotificationCenter.current() @@ -115,6 +117,7 @@ extension BrazeAppDelegate: UNUserNotificationCenterDelegate { withCompletionHandler completionHandler: @escaping () -> Void ) { // Forward user notification to Braze. + BrazeReactUtils.sharedInstance().populateInitialUrl(forCategories: response.notification.request.content.userInfo) let handledByBraze = BrazeAppDelegate.braze?.notifications.handleUserNotification( response: response, withCompletionHandler: completionHandler diff --git a/plugin/package.json b/plugin/package.json index e00eae8..dd5dc1c 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@braze/expo-plugin", - "version": "1.1.0", + "version": "1.1.1", "description": "Config plugin for @braze/react-native-sdk package", "main": "build/withBraze.js", "types": "build/withBraze.d.ts",