@braze/expo-plugin
Advanced tools
Comparing version 0.1.0 to 0.2.0
export declare type ConfigProps = { | ||
apiKey: string; | ||
androidApiKey: string; | ||
iosApiKey: string; | ||
customEndpoint: string; | ||
@@ -4,0 +5,0 @@ fcmSenderID?: string; |
@@ -10,3 +10,3 @@ "use strict"; | ||
const withBraze = (config, _props) => { | ||
const props = _props || { apiKey: "", customEndpoint: "" }; | ||
const props = _props || { androidApiKey: "", iosApiKey: "", customEndpoint: "" }; | ||
config = (0, withBrazeAndroid_1.withAndroidBrazeSdk)(config, props); | ||
@@ -13,0 +13,0 @@ config = (0, withBrazeiOS_1.withIOSBrazeSdk)(config, props); |
@@ -14,3 +14,3 @@ "use strict"; | ||
const ANDROID_CONFIG_MAP = { | ||
"apiKey": ["com_braze_api_key", BX_STR], | ||
"androidApiKey": ["com_braze_api_key", BX_STR], | ||
"customEndpoint": ["com_braze_custom_endpoint", BX_STR], | ||
@@ -17,0 +17,0 @@ "fcmSenderID": ["com_braze_firebase_cloud_messaging_sender_id", BX_STR], |
@@ -15,6 +15,6 @@ "use strict"; | ||
delete config.modResults.Braze; | ||
const { apiKey, customEndpoint } = props; | ||
if (apiKey) { | ||
const { iosApiKey, customEndpoint } = props; | ||
if (iosApiKey) { | ||
config.modResults.Braze = { | ||
ApiKey: apiKey, | ||
ApiKey: iosApiKey, | ||
Endpoint: customEndpoint, | ||
@@ -21,0 +21,0 @@ }; |
{ | ||
"name": "@braze/expo-plugin", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Config plugin for react-native-appboy-sdk package", | ||
@@ -5,0 +5,0 @@ "main": "build/withBraze.js", |
export type ConfigProps = { | ||
apiKey: string; | ||
androidApiKey: string; | ||
iosApiKey: string; | ||
customEndpoint: string; | ||
@@ -4,0 +5,0 @@ fcmSenderID?: string; |
@@ -14,3 +14,3 @@ import { ConfigPlugin, createRunOncePlugin } from "@expo/config-plugins"; | ||
) => { | ||
const props = _props || { apiKey: "", customEndpoint: "" }; | ||
const props = _props || { androidApiKey: "", iosApiKey: "", customEndpoint: "" }; | ||
@@ -17,0 +17,0 @@ config = withAndroidBrazeSdk(config, props); |
@@ -24,3 +24,3 @@ import { writeFileSync } from 'fs'; | ||
const ANDROID_CONFIG_MAP = { | ||
"apiKey": ["com_braze_api_key", BX_STR], | ||
"androidApiKey": ["com_braze_api_key", BX_STR], | ||
"customEndpoint": ["com_braze_custom_endpoint", BX_STR], | ||
@@ -27,0 +27,0 @@ "fcmSenderID": ["com_braze_firebase_cloud_messaging_sender_id", BX_STR], |
@@ -15,6 +15,6 @@ import { ConfigPlugin, withInfoPlist, withPodfileProperties } from "@expo/config-plugins"; | ||
delete config.modResults.Braze; | ||
const { apiKey, customEndpoint } = props; | ||
if (apiKey) { | ||
const { iosApiKey, customEndpoint } = props; | ||
if (iosApiKey) { | ||
config.modResults.Braze = { | ||
ApiKey: apiKey, | ||
ApiKey: iosApiKey, | ||
Endpoint: customEndpoint, | ||
@@ -21,0 +21,0 @@ }; |
26004
451