braze-inc / braze-expo-plugin Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Android
0.70.5
1.1.0
3.0.0
100%
My steps:
rm -rf node_modules android .expo
.yarn
expo prebuild --clean
expo run:android
Android app will be builded
The are two errors:
> Task :expo-dev-launcher:compileDebugKotlin FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':expo-dev-launcher:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 6 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
My expo version is 48
iOS
"react-native": "0.72.6",
"@braze/expo-plugin": "^1.1.2",
"@braze/react-native-sdk": "^8.0.0",
100%
Followed the developer guides to implement the braze expo plugin
plugins: [
'@react-native-firebase/app',
'@react-native-firebase/dynamic-links', // https://rnfirebase.io/dynamic-links/usage#ios-setup
[
'@braze/expo-plugin',
{
baseUrl: 'sdk.iad-05.braze.com',
androidApiKey:
getEnvVar(EnvKeys.BRAZE_ANDROID_API_KEY) ||
process.env.EXPO_PUBLIC_BRAZE_ANDROID_API_KEY,
iosApiKey:
getEnvVar(EnvKeys.BRAZE_IOS_API_KEY) || process.env.EXPO_PUBLIC_BRAZE_IOS_API_KEY,
enableBrazeIosPush: true,
enableFirebaseCloudMessaging: true,
firebaseCloudMessagingSenderId: '869676010842',
androidHandlePushDeepLinksAutomatically: true,
},
],
[
'expo-build-properties',
{
ios: {
deploymentTarget: '13.0',
useFrameworks: 'static',
},
},
],
],
I also have braze.changeUser() when logging in.
I keep getting BadDeviceToken
for iOS push notifications. I have FCM setup through EAS credentials as well. Android is working just fine when sending push notifications from braze campaigns. Also should note that when i test FCM push notifications through curl
, i receive them just fine on iOS.
I should note as well that i have received In App Messaging
on both iOS and Android, so i know the keys and baseUrl is setup correctly.
To receive the Test push notifications sending to my iOS device
No braze push notification comes through, and sometimes ill get a BadDeviceToken
show up in the message activity logs.
I should note that everytime i send it to my email that is signed into app on iOS, i get a success message on the push notification sending.
No response
No response
iOS (not tried on android)
0.70.5
0.5.0, 0.6.0
1.41.0
100% of the time
import Braze from "react-native-appboy-sdk"
.Braze.enableSDK()
somewhere in the appVerbose logging.
Likely a separate issue as probably by design, but it's surprising sdk methods such as getContentCards don't fail when the sdk hasn't been configured correctly - they silently return.
Zero Braze logs (even when sdk hasn't been configured correctly, eg attempting to get content cards with invalid API keys).
No response
Can reproduce on a new project - https://github.com/pwfcurry/braze-sdk-sandbox
This definitely worked at some point last year - sadly I don't recall the versions of the plugin or appboy.
When setting up push notifications for android following the expo docs here there was no mention of custom small icons, as well as other custom configuration that is available through the standard docs via configuration in the braze.xml
file.
I was stuck with one of those sexy mono-color squares for a small icon until I stumbled across the standard integration docs and realized what was up.
To simplify the workflow and avoid needing to edit the braze.xml file directly, it'd be nice if some new config options were added to ConfigProps
and the ANDROID_CONFIG_MAP
so that way these items could be configured when calling, withBraze
.
The workaround described allows me to do this by passing config including these to withBraze
'notificationSmallIcon': '@drawable/notification_icon',
'notificationAccentColor': '@color/notification_icon_color'
As an npm postinstall
I currently run this script to modify ANDROID_CONFIG_MAP
and withBrazeAndroid
implementation so that I can set notification icon and accent color with the config I pass to withBraze
.
const brazeAndroidConstantsPath = `${process.cwd()}/node_modules/@braze/expo-plugin/build/brazeAndroidConstants.js`;
let brazeAndroidConstantsContents = fs.readFileSync(brazeAndroidConstantsPath).toString();
brazeAndroidConstantsContents = brazeAndroidConstantsContents.replace(
'exports.ANDROID_CONFIG_MAP = {',
`exports.ANDROID_CONFIG_MAP = {
"notificationSmallIcon": ["com_braze_push_small_notification_icon", 'drawable'],
"notificationAccentColor": ["com_braze_default_notification_accent_color", 'color'],`);
fs.writeFileSync(brazeAndroidConstantsPath, brazeAndroidConstantsContents);
const withBrazeAndroidPath = `${process.cwd()}/node_modules/@braze/expo-plugin/build/withBrazeAndroid.js`;
let withBrazeAndroidContents = fs.readFileSync(withBrazeAndroidPath).toString();
withBrazeAndroidContents = withBrazeAndroidContents.replace(`break;
}`, `break;
default:
brazeXml += \`<\${xmlKeyType} name="\${xmlKeyName}">\${value}</\${xmlKeyType}>\`;
}`);
fs.writeFileSync(withBrazeAndroidPath, withBrazeAndroidContents);
Something along the lines of this...
ANDROID_CONFIG_MAP
portion of src/brazeAndroidConstants.ts
:"notificationSmallIcon": ["com_braze_push_small_notification_icon", 'drawable'],
"notificationAccentColor": ["com_braze_default_notification_accent_color", 'color'],
ConfigProps
in src/types.ts
:notificationSmallIcon?: string,
notificationAccentColor?: string
src/withBrazeAndroid
- or add new explicit cases for drawable/color
if you prefer thatdefault:
brazeXml += `<${xmlKeyType} name="${xmlKeyName}">${value}</${xmlKeyType}>`;
It'd be worth considering other braze.xml
configurable options to add to this type/map as well. Unless there are particular reasons to exclude certain options from being configured via withBraze
might as well add them.
iOS
0.78.1
1.1.1
2.1.0
100%
Clone the repository and follow the steps in the example/
README.
Expo prebuild should succeed and the example app should run.
An error is thrown when running expo prebuild
› npx expo prebuild
✔ Created native projects | /android, /ios already created | gitignore already synced
✔ Updated package.json and added index.js entry point for iOS and Android
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
✔ Installed JavaScript dependencies 490ms
✖ Config sync failed
Cannot read properties of undefined (reading 'withJsEnginePodfileProps')
TypeError: Cannot read properties of undefined (reading 'withJsEnginePodfileProps')
at withIosExpoPlugins (/.config/yarn/global/node_modules/@expo/prebuild-config/src/plugins/withDefaultPlugins.ts:58:5)
at getPrebuildConfig (/.config/yarn/global/node_modules/@expo/prebuild-config/src/getPrebuildConfig.ts:78:14)
at getPrebuildConfigAsync (.config/yarn/global/node_modules/@expo/prebuild-config/src/getPrebuildConfig.ts:24:10)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at configureManagedProjectAsync (/.config/yarn/global/node_modules/expo-cli/src/commands/eject/configureProjectAsync.ts:48:25)
at prebuildAsync (/.config/yarn/global/node_modules/expo-cli/src/commands/eject/prebuildAppAsync.ts:88:21)
at actionAsync (/.config/yarn/global/node_modules/expo-cli/src/commands/eject/prebuildAsync.ts:37:3)
No response
The only thing stopping me from using this plugin is lack of support for custom sounds. Let me know if I am mistaken and this is supported!
None that I am aware of
Expo Notifications supports custom sounds like this: https://docs.expo.dev/versions/latest/sdk/notifications/#example-appjson-with-config-plugin
{
"expo": {
"plugins": [
[
"expo-notifications",
{
"icon": "./local/assets/notification-icon.png",
"color": "#ffffff",
"sounds": [
"./local/assets/notification-sound.wav",
"./local/assets/notification-sound-other.wav"
]
}
]
]
}
}
No response
iOS
0.72.4
1.1.2
8.0.0 and 7.0.0
100% of the time
Example:
npm install @braze/react-native-sdk
npx expo install @braze/expo-plugin
npx eas build --platform ios --local
Was expecting latest versions of both libs to install and correctly build together.
Build exits with non-zero code: 1 for @braze/react-native-sdk
versions 8.0.0
and 7.0.0
, but succeeds on 6.0.2
for @braze/react-native-sdk version 8.0.0:
[INSTALL_PODS] [!] CocoaPods could not find compatible versions for pod "BrazeLocation":
[INSTALL_PODS] In Podfile:
[INSTALL_PODS] braze-react-native-sdk (from `../node_modules/@braze/react-native-sdk`) was resolved to 8.0.0, which depends on
[INSTALL_PODS] BrazeLocation (~> 7.0.0)
[INSTALL_PODS] None of your spec sources contain a spec satisfying the dependency: `BrazeLocation (~> 7.0.0)`.
[INSTALL_PODS] You have either:
[INSTALL_PODS] * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[INSTALL_PODS] * mistyped the name or version.
[INSTALL_PODS] * not added the source repo that hosts the Podspec to your Podfile.
[INSTALL_PODS] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `312E17064E334D99BE484531` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
[INSTALL_PODS]
Error: pod install exited with non-zero code: 31
at ChildProcess.completionListener (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
at Object.onceWrapper (node:events:642:26)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
at spawnAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
at spawn (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
at installPods (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/ios/pod.js:11:38)
at /Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:70:41
at BuildContext.runBuildPhase (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/context.js:101:34)
at buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:69:19)
at async runBuilderWithHooksAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
at async Object.iosBuilder (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:29:16)
at async buildIosAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/ios.js:66:12)
at async buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/build.js:54:29)
Build failed
Unknown error. See logs of the Install pods build phase for more information.
npx exited with non-zero code: 1
Error: build command failed.
and for @braze/react-native-sdk version 7.0.0:
[INSTALL_PODS] [!] CocoaPods could not find compatible versions for pod "BrazeKit":
[INSTALL_PODS] In Podfile:
[INSTALL_PODS] braze-react-native-sdk (from `../node_modules/@braze/react-native-sdk`) was resolved to 7.0.0, which depends on
[INSTALL_PODS] BrazeKit (~> 6.6.0)
[INSTALL_PODS] None of your spec sources contain a spec satisfying the dependency: `BrazeKit (~> 6.6.0)`.
[INSTALL_PODS] You have either:
[INSTALL_PODS] * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[INSTALL_PODS] * mistyped the name or version.
[INSTALL_PODS] * not added the source repo that hosts the Podspec to your Podfile.
[INSTALL_PODS] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `72B3EE9BDD3449A7A7BFF4AA` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
[INSTALL_PODS]
Error: pod install exited with non-zero code: 31
at ChildProcess.completionListener (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
at Object.onceWrapper (node:events:642:26)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
at spawnAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
at spawn (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
at installPods (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/ios/pod.js:11:38)
at /Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:70:41
at BuildContext.runBuildPhase (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/context.js:101:34)
at buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:69:19)
at async runBuilderWithHooksAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
at async Object.iosBuilder (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:29:16)
at async buildIosAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/ios.js:66:12)
at async buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/build.js:54:29)
Build failed
Unknown error. See logs of the Install pods build phase for more information.
npx exited with non-zero code: 1
Error: build command failed.
Other than described above, I was just setting up Braze and the Expo plugin using the example found here
Android
0.73.2
1.2.0
8.3.0
100% of this time
Successful Build
Execution failed for task ':braze-expo-plugin:compileDebugKotlin'.
'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':braze-expo-plugin:compileDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:147)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: org.gradle.api.GradleException: 'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.validateKotlinAndJavaHasSameTargetCompatibility(Tasks.kt:797)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin_common(Tasks.kt:722)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin_common(Tasks.kt:530)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.executeImpl(Tasks.kt:450)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:417)
No response
Both
0.68.2
1.0.1
2.1.0
100%
Example:
expo prebuild
.Should install and synch the configuration native, so should be create the ios and android folders.
Show the following errors:
Cannot find module 'expo/config-plugins'
Cannot find module 'expo/config-plugins'
Require stack:
/...../node_modules/@braze/expo-plugin/build/withBraze.js
- /......./node_modules/@braze/expo-plugin/app.plugin.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/index.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config/build/plugins/withConfigPlugins.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config/build/Config.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config/build/index.js
- /opt/homebrew/lib/node_modules/expo-cli/build/utils/migration.js
- /opt/homebrew/lib/node_modules/expo-cli/build/commands/eject/prebuildAsync.js
- /opt/homebrew/lib/node_modules/expo-cli/build/commands/eject/prebuild.js
- /opt/homebrew/lib/node_modules/expo-cli/build/commands/index.js
- /opt/homebrew/lib/node_modules/expo-cli/build/exp.js
- /opt/homebrew/lib/node_modules/expo-cli/bin/expo.js
Part of my package.jso:
"dependencies": {
"@braze/expo-plugin": "^1.0.1",
"@braze/react-native-sdk": "^2.1.0",
"@expo/config-plugins": "^4.1.0",
"expo": "^45.0.0",
"react": "17.0.2",
"react-native": "0.68.2",
"react-native-config": "^1.5.0",
},
part of my app.config.js:
plugins: [
[
'@braze/expo-plugin',
{
androidApiKey: 'APIKEY',
iosApiKey: 'APIKEY,
baseUrl: 'baseUrl',
},
],
],
iOS
0.70.5
1.0.0
1.41.0
100
When running the expo prebuild
command
"ios.useFrameworks": "static"
is added on the Podfile.properties.json
file.
This, will break builds that are using Flipper, for example.
I think this should be listed somewhere in the docs.
Docs should warn of plugin setting useFramework
to static
"ios.useFrameworks": "static"
No response
No response
Since Expo SDK 47 was released, the minimum deployment target
needed for iOS is 13.
The current platform version defined in the ExpoAdapterBraze.podspec is 12. It makes impossible to install this plugin on a project with Expo SDK 47 without having this error :
compiling for iOS 12.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.0
Would it be possible to upgrade the platform version in the podspec from 12 to 13 ?
I have push notifications all setup with expo project and braze working. But i know with my bare RN app, i had to setup a rich service extension to allow images to be attach to push notifications.
Is that currently available in the expo plugin? If not, how can that be added?
Not sure - attaching images to iOS push notifications do not show up in the push notification
that can be added to either the plugin config setup, or steps to add a plugin to add the rich service extension to the expo project
"@braze/expo-plugin": "^1.1.2",
"@braze/react-native-sdk": "^8.0.0",
"expo": "^49.0.0",
Android
All
0.5.0
1.41.0
With a push with "Open app on Press" on Android
Setup Braze on a project with push notification
Send push notification on Android user
Try to press on the notification
Open the App
The press on the Push notification on Android does not anything
No response
I found a troubleshooting in the documentation, after trying to modify the src directly in my node module, its works,
https://www.braze.com/docs/developer_guide/platform_integration_guides/android/push_notifications/android/troubleshooting#tapping-push-notification-doesnt-open-the-app
You can find my PR on your Repo :
#9
iOS
0.72.6
1.2.0
2.1.0
100%
Example:
npx expo install @braze/react-native-sdk@~2.1.0
.npx expo install @braze/expo-plugin@^1.2.0
.app.json
:
{
// ...
"plugins": [
"@react-native-firebase/app",
[
"@braze/expo-plugin",
{
"androidApiKey": "YOUR-ANDROID-API-KEY",
"iosApiKey": "YOUR-IOS-API-KEY",
"baseUrl": "mock-braze.local",
"sessionTimeout": 60,
"enableGeofence": false,
"enableBrazeIosPush": false,
"enableFirebaseCloudMessaging": false,
"firebaseCloudMessagingSenderId": "YOUR-FCM-SENDER-ID",
"androidHandlePushDeepLinksAutomatically": true,
"enableSdkAuthentication": false,
"logLevel": 0,
"minimumTriggerIntervalInSeconds": 0,
"enableAutomaticLocationCollection": false,
"enableAutomaticGeofenceRequests": false,
"dismissModalOnOutsideTap": true,
"androidPushNotificationHtmlRenderingEnabled": true,
"androidNotificationAccentColor": "#ff3344",
"iosRequestPushPermissionsAutomatically": false
}
]
}
npx expo prebuild
.cd ios && pod install --repo-update
.npx expo run:ios
.The app should build and run normally.
The iOS build process exited with error: value of type 'Braze.Configuration.Push' has no member 'automation'
# expo run:ios
# ...
› Compiling @braze/react-native-sdk Pods/braze-react-native-sdk » BrazeReactBridge.m
› Compiling @braze/react-native-sdk Pods/braze-react-native-sdk » braze-react-native-sdk-dummy.m
› Compiling @braze/react-native-sdk Pods/braze-react-native-sdk » BrazeReactUtils.m
› Compiling @braze/expo-plugin Pods/ExpoAdapterBraze » BrazeAppDelegate.swift
❌ (node_modules/@braze/expo-plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift:72:28)
70 |
71 | if let useBrazePush = plistConfig["UseBrazePush"] as? Bool, useBrazePush {
> 72 | configuration.push.automation = true
| ^ value of type 'Braze.Configuration.Push' has no member 'automation'
73 | configuration.push.automation.requestAuthorizationAtLaunch = false
74 | }
75 |
❌ (node_modules/@braze/expo-plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift:73:28)
71 | if let useBrazePush = plistConfig["UseBrazePush"] as? Bool, useBrazePush {
72 | configuration.push.automation = true
> 73 | configuration.push.automation.requestAuthorizationAtLaunch = false
| ^ value of type 'Braze.Configuration.Push' has no member 'automation'
74 | }
75 |
76 | if let requestAuthorizationAtLaunch = plistConfig["RequestPushPermissionsAutomatically"] as? Bool,
❌ (node_modules/@braze/expo-plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift:78:28)
76 | if let requestAuthorizationAtLaunch = plistConfig["RequestPushPermissionsAutomatically"] as? Bool,
77 | requestAuthorizationAtLaunch {
> 78 | configuration.push.automation.requestAuthorizationAtLaunch = true
| ^ value of type 'Braze.Configuration.Push' has no member 'automation'
79 | }
80 |
81 | let braze = BrazeReactBridge.perform(#selector(BrazeReactBridge.initBraze(_:)), with: configuration).takeUnretainedValue() as! Braze
› Compiling expo-splash-screen Pods/EXSplashScreen » EXSplashScreenModule.m
› Compiling expo-keep-awake Pods/ExpoKeepAwake » ExpoKeepAwake-dummy.m
› Compiling @braze/expo-plugin Pods/ExpoAdapterBraze » ExpoAdapterBraze-dummy.m
# ... warnings about "Script has ambiguous dependencies causing it to run on every build."
› 3 error(s), and 3 warning(s)
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
error Command failed with exit code 1.
I'm trying to install Braze SDK in my Expo/React Native project, according to the documentation, but get stuck here when trying to run on iOS.
iOS
react-native
^1.0.0
^2.0.2
100%
Braze.getInitialURL
returns null.Braze.getInitialURL
should return the deep link sent with the notification.
Braze.getInitialURL
returns null.
No response
This issue has been reported on the braze-inc/braze-react-native-sdk before multiple times:
But the issue still persists when using this Expo config plugin.
Android
0.70.8
1.1.1
4.1.0
100%
After adding to the Braze project, when from the Tool of Expo notifications (https://expo.dev/Notifications) I try to send a notification on an Android device, the device does not receive the push notification.
If, on the other hand, I remove the Braze dependencies and try to send a notification, the device receives notifications again.
Even after setting braze, notifications must continue to work the same.
Android devices do not receive notifications
Braze v24.3.0 .Braze FirebaseMessagingService( 1683): Remote message did not originate from Braze. Not consuming remote message: com.google.firebase.messaging.RemoteMessage
No response
iOS
0.70.5
0.4.0
1.40.0
100% of the time
Example:
"plugins": [
[
"@braze/expo-plugin",
{
"androidApiKey": "ANDROID_API_KEY",
"iosApiKey": "IOS_API_KEY",
"baseUrl": "BRAZE_URL",
"enableBrazeIosPush": true,
"enableFirebaseCloudMessaging": true,
"firebaseCloudMessagingSenderId": "SENDER_ID"
}
]
]
pod install
in the ios
directory. Command pod install
failed.cd ios/ && pod install
to try to install the iOS dependencies manually and check if I can get more details on the error.It should install iOS pods without errors.
Instead, I get this error on the pod install
Installing react-native-appboy-sdk (1.40.0)
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `ExpoAdapterBraze` depends upon `react-native-appboy-sdk`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies
The Swift pod `ExpoAdapterBraze` depends upon `react-native-appboy-sdk`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies
If we don't want to modify the Podfile of our app (as we are in managed workflow), it looks like that something needs to be added in the podspec of the react-native-appboy-sdk
(https://blog.cocoapods.org/CocoaPods-1.5.0/)
Both
0.70.5
0.5.0
1.41.0
100% of the time
When using Expo 47, run expo doctor
.
> expo doctor
Expected package @expo/config-plugins@^5.0.2
Found invalid:
@expo/[email protected]
(for more info, run: npm why @expo/config-plugins)
expo doctor
passes
expo doctor
fails
> yarn why @expo/config-plugins
yarn why v1.22.19
[1/4] 🤔 Why do we have the module "@expo/config-plugins"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "@expo/[email protected]"
info Has been hoisted to "@expo/config-plugins"
info Reasons this module exists
- Hoisted from "expo#@expo#config-plugins"
- Hoisted from "expo-updates#@expo#config-plugins"
- Hoisted from "expo#@expo#cli#@expo#config-plugins"
- Hoisted from "expo#@expo#config#@expo#config-plugins"
- Hoisted from "expo-splash-screen#@expo#prebuild-config#@expo#config-plugins"
info Disk size without dependencies: "1.98MB"
info Disk size with unique dependencies: "3.63MB"
info Disk size with transitive dependencies: "7.39MB"
info Number of shared dependencies: 46
=> Found "@braze/expo-plugin#@expo/[email protected]"
info This module exists because "@braze#expo-plugin" depends on it.
info Disk size without dependencies: "1.6MB"
info Disk size with unique dependencies: "3.25MB"
info Disk size with transitive dependencies: "7.02MB"
info Number of shared dependencies: 46
✨ Done in 1.06s.
This doesn't appear to be causing any issues, other than expo doctor
failing, but we've yet to use the braze sdk in anger.
One option is to pin the dependency via a resolution, but we'd rather avoid that.
Working on a React Native Expo Go app for Walmart. Using my personal account here since Walmart uses on-prem github. We have onboarding flow where the user is push primed then given the OS-level prompt from Braze.requestPushPermission()
, and once that's completed, sent along the onboarding flow.
Without Braze.requestPushPermission()
returning a promise, we can't wait for it. so the user is shown the next onboaring screen prematurely.
The only way around this that I've found is a a setTimeout of about 5000 ms. Super hacky and obv bad UX. I thought you might have listeners I could subscribe to. Something like Braze.addListener('pushPermissionChange', onPermissionChange);
but that doesn't seem to be the case either.
Either return a promise and success message (or the token) or some kind of listener we can use.
No response
TLDR @braze/expo-plugin v0.4.0 isn't compatible with react-native-appboy-sdk v1.39 & v1.40 -- downgrade to v1.38 to fix
Android
0.68.2
0.4.0
1.40.0
100% of the time
yarn add @braze/[email protected] [email protected]
# add braze config to app.json…
eas build --platform android --local
Build succeeds
Build fails
[RUN_GRADLEW] Using expo modules
…
[RUN_GRADLEW] - braze-expo-plugin (0.4.0)
…
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Build file '/private/var/…/build/node_modules/react-native-appboy-sdk/android/build.gradle' line: 33
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating project ':react-native-appboy-sdk'.
[RUN_GRADLEW] > Could not get unknown property 'kotlinVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED
[RUN_GRADLEW] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[RUN_GRADLEW] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[RUN_GRADLEW] See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
[RUN_GRADLEW] 6 actionable tasks: 6 executed
[RUN_GRADLEW] in 55s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Due to braze-inc/braze-react-native-sdk#164 (released in 1.39.0), we've been unable to build our app:
> EAS_LOCAL_BUILD_SKIP_CLEANUP=1 eas build --platform android --local --non-interactive
…
[RUN_GRADLEW] A problem occurred evaluating project ':react-native-appboy-sdk'.
[RUN_GRADLEW] > Could not get unknown property 'kotlinVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Downgrading to v1.38.0 fixes the issue.
Both
0.70.5
0.6.0
2.1.0
100%
@braze/expo-plugin
@braze/react-native-sdk
(instead of deprecated react-native-appboy-sdk
)It should correctly build the app.
It throws an error for both platforms:
Logs from EAS.
[stderr] A problem occurred evaluating project ':braze-expo-plugin'.
[stderr] > Project with path ':react-native-appboy-sdk' could not be found in project ':braze-expo-plugin'.
[!] Unable to find a specification for `react-native-appboy-sdk` depended upon by `ExpoAdapterBraze`
> Task :react-native-gradle-plugin:compileJava NO-SOURCE
> Task :react-native-gradle-plugin:classes
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC
> Task :react-native-gradle-plugin:jar
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/node_modules/@braze/expo-plugin/android/build.gradle' line: 48
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':braze-expo-plugin'.
[stderr] > Project with path ':react-native-appboy-sdk' could not be found in project ':braze-expo-plugin'.
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 1m 46s
It seems like @braze/expo-plugin
is not compatible with the new @braze/react-native-sdk
package. It works correctly with the deprecatedreact-native-appboy-sdk
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.