diff --git a/example/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj b/example/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj index 81168eb9..b3709a06 100644 --- a/example/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj +++ b/example/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj @@ -206,10 +206,14 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-AnalyticsReactNativeExample/Pods-AnalyticsReactNativeExample-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/BrazeKit/BrazeKit.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/BrazeUI/BrazeUI.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/BrazeKit.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/BrazeUI.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", ); runOnlyForDeploymentPostprocessing = 0; diff --git a/example/ios/AnalyticsReactNativeExample/AppDelegate.mm b/example/ios/AnalyticsReactNativeExample/AppDelegate.mm index 844759de..8b398e55 100644 --- a/example/ios/AnalyticsReactNativeExample/AppDelegate.mm +++ b/example/ios/AnalyticsReactNativeExample/AppDelegate.mm @@ -9,9 +9,9 @@ // #import // #import -//#import "BrazeReactUtils.h" -//#import "BrazeReactBridge.h" -//#import +// #import "BrazeReactUtils.h" +// #import "BrazeReactBridge.h" +// #import #if RCT_NEW_ARCH_ENABLED #import @@ -36,15 +36,21 @@ @interface AppDelegate () @implementation AppDelegate //enable for Braze Plugin -//static NSString *const apiKey = @""; -//static NSString *const endpoint = @""; +static NSString *const apiKey = @" moduleInitializer = [[BrazeReactBridge alloc] init]; +// NSURL *jsCodeLocation = +// [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +// RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation +// moduleName:@"AnalyticsReactNativeExample" +// initialProperties:nil +// launchOptions:launchOptions]; + RCTAppSetupPrepareApp(application); RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; @@ -64,8 +70,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } else { rootView.backgroundColor = [UIColor whiteColor]; } - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; @@ -81,9 +85,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // enable for braze plugin // BRZConfiguration *configuration = [[BRZConfiguration alloc] initWithApiKey:apiKey -// endpoint:endpoint]; +// endpoint:endpoint]; // - Enable logging and customize the configuration here -// configuration.logger.level = BRZLoggerLevelInfo; +// configuration.logger.level = BRZLoggerLevelInfo; // Braze *braze = [BrazeReactBridge initBraze:configuration]; // AppDelegate.braze = braze; @@ -160,15 +164,15 @@ - (Class)getModuleClassFromName:(const char *)name // enable for Braze Plugin //#pragma mark - AppDelegate.braze -// -//static Braze *_braze = nil; -// -//+ (Braze *)braze { + +// static Braze *_braze = nil; + +// + (Braze *)braze { // return _braze; -//} -// -//+ (void)setBraze:(Braze *)braze { -// _braze = braze; +// } + +// + (void)setBraze:(Braze *)braze { +// _braze = braze; //} @end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 17734800..b231e83d 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,5 +1,15 @@ PODS: - boost (1.76.0) + - braze-react-native-sdk (4.1.0): + - BrazeKit (~> 5.13.0) + - BrazeLocation (~> 5.13.0) + - BrazeUI (~> 5.13.0) + - React-Core + - BrazeKit (5.13.0) + - BrazeLocation (5.13.0): + - BrazeKit (= 5.13.0) + - BrazeUI (5.13.0): + - BrazeKit (= 5.13.0) - DoubleConversion (1.1.6) - FBLazyVector (0.69.7) - FBReactNativeSpec (0.69.7): @@ -300,17 +310,18 @@ PODS: - React - RNGestureHandler (2.9.0): - React-Core - - segment-analytics-react-native (2.13.5): + - segment-analytics-react-native (2.14.0): - React-Core - sovran-react-native - segment-analytics-react-native-plugin-idfa (0.6.2): - React-Core - - sovran-react-native (1.0.2): + - sovran-react-native (1.0.3): - React-Core - Yoga (1.14.0) DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) + - "braze-react-native-sdk (from `../node_modules/@braze/react-native-sdk`)" - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) @@ -356,11 +367,16 @@ DEPENDENCIES: SPEC REPOS: trunk: + - BrazeKit + - BrazeLocation + - BrazeUI - fmt EXTERNAL SOURCES: boost: :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" + braze-react-native-sdk: + :path: "../node_modules/@braze/react-native-sdk" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: @@ -446,6 +462,10 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 + braze-react-native-sdk: 686da10a997500422984bd4b39c78fc19fcd701a + BrazeKit: 97f6875bf05920a46a2f0c9d0e452b6b840c5f99 + BrazeLocation: 571ee6bf6b2f5c1aba20d9a75e4da190f8db7e5b + BrazeUI: 31dd9f0235149f05d6f7e37f273be7293e000587 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: 6b7f5692909b4300d50e7359cdefbcd09dd30faa FBReactNativeSpec: affcf71d996f6b0c01f68883482588297b9d5e6e @@ -484,9 +504,9 @@ SPEC CHECKSUMS: RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 RNGestureHandler: 071d7a9ad81e8b83fe7663b303d132406a7d8f39 - segment-analytics-react-native: 76a34e456743b72adfd0f1d7a537a0dc22b52f8b + segment-analytics-react-native: 83f46e22fcd44a85f450464ad98e6c8e128e3f8e segment-analytics-react-native-plugin-idfa: 6165a8eb6c35fdfecc3e9f966a2c9895ed9abaf1 - sovran-react-native: b237e6a8b37a754b2e1123a3130d01a07cf4e91b + sovran-react-native: 217270c2c5d1ad45b2f60e31b06b18d478018202 Yoga: 0b84a956f7393ef1f37f3bb213c516184e4a689d PODFILE CHECKSUM: 148f23dc44ebce74497f5fef0651f1fea1f8a361 diff --git a/packages/core/src/info.ts b/packages/core/src/info.ts index 31810f57..a078bebe 100644 --- a/packages/core/src/info.ts +++ b/packages/core/src/info.ts @@ -1,4 +1,4 @@ export const libraryInfo = { name: '@segment/analytics-react-native', - version: '2.13.5', + version: '2.14.0', }; diff --git a/packages/plugins/plugin-braze/README.md b/packages/plugins/plugin-braze/README.md index 45cb7bae..9bb4dceb 100644 --- a/packages/plugins/plugin-braze/README.md +++ b/packages/plugins/plugin-braze/README.md @@ -1,19 +1,19 @@ # @segment/analytics-react-native-plugin-braze -`DestinationPlugin` for [Braze](https://www.braze.com). Wraps [`react-native-appboy-sdk`](https://github.com/Appboy/appboy-react-sdk). This Plugin should be used with a [Device Mode](https://segment.com/docs/connections/destinations/#connection-modes) connection to Braze. To connect to Braze with a Cloud Mode connection use the [Braze Middleware Plugin]((https://www.npmjs.com/package/@segment/analytics-react-native-plugin-braze))instead. It is not possible to use both plugins in one `Analytics React Native` instance. +`DestinationPlugin` for [Braze](https://www.braze.com). Wraps [`@braze/react-native-sdk`](https://github.com/Appboy/appboy-react-sdk). This Plugin should be used with a [Device Mode](https://segment.com/docs/connections/destinations/#connection-modes) connection to Braze. To connect to Braze with a Cloud Mode connection use the [Braze Middleware Plugin]((https://www.npmjs.com/package/@segment/analytics-react-native-plugin-braze))instead. It is not possible to use both plugins in one `Analytics React Native` instance. ## Installation -You need to install the `@segment/analytics-react-native-plugin-braze` and the `react-native-appboy-sdk` dependency. +You need to install the `@segment/analytics-react-native-plugin-braze` and the `@braze/react-native-sdk` dependency. Using NPM: ```bash -npm install --save @segment/analytics-react-native-plugin-braze react-native-appboy-sdk +npm install --save @segment/analytics-react-native-plugin-braze @braze/react-native-sdk ``` Using Yarn: ```bash -yarn add @segment/analytics-react-native-plugin-braze react-native-appboy-sdk +yarn add @segment/analytics-react-native-plugin-braze @braze/react-native-sdk ``` Run `pod install` after the installation to autolink the Braze SDK.