braze-inc / braze-react-native-sdk

Public repo for the Braze React Native SDK
https://www.braze.com
Other
64 stars 84 forks source link

[Feature Request] Add support for Expo Config Plugins #119

Closed leggomuhgreggo closed 2 years ago

leggomuhgreggo commented 3 years ago

I'm on a team that's fixin to start work on a cross-platform Expo app, intended to replace our three legacy clients. Wanted to inquire whether y'all would consider adding support for Config Plugins, so this library can be used with the Expo Managed Workflow (i.e. without ejecting)

This would enable Expo users to use the Braze/appboy SDK with much less friction

Thanks for your consideration!

Feature Context

Over the past several months Expo has introduced features which enable apps to use external native modules, without ejecting Expo's managed workflow.

The customizations to the iOS and Android code that are required by a given native module are automated, using an AST-based API that Expo provides through "Config Plugins" feature.

These automations (called "mods") are executed during a new "Prebuild" phase, in which boilerplate ios and android directories are created — and then their respective files are altered, based on the instructions in a given modules config plugin. The end result is essentially the same as if you ejected and manually changed the ios/android files.

Here's the Expo blog post announcing Config Plugins and the associated feature-set.

Overview of Proposed Implementation

The process for creating a Config Plugin is detailed here: https://docs.expo.io/guides/config-plugins/#creating-a-plugin

There are a few different "recipes" for how to implement — but the gist of it is:

nathankleyn commented 3 years ago

Huge plus one from us here at Pave! This would massively simplify the integration effort for us with Braze. 👍

wesleyorbin commented 3 years ago

Hi everyone! It's on our roadmap to do a deep dive into supporting this. We will keep you updated here. Thank you for your patience!

westhechiang commented 3 years ago

We just upgraded to Expo 43 and are experiencing issues with our previously working config plugin for Braze. Posting here to see if anyone else was experiencing anything similar.

fantasyado commented 2 years ago

We just upgraded to Expo 43 and are experiencing issues with our previously working config plugin for Braze. Posting here to see if anyone else was experiencing anything similar.

@wesleyorbin Hello, Have you fixed the problem with Expo 43? I'm also trying to integrate with braze in the Expo project without ejecting. Do you mind sharing your plugin code? I haven't dealt with expo plugin before...

Thanks very much!

Bucimis commented 2 years ago

Hi @fantasyado, we still don't offer formal non-ejected Expo support but it's still on our roadmap (likely target is first half next year). Are you running into issues with a config plugin for Expo 43 specifically, or just looking at how to get started?

fantasyado commented 2 years ago

Hi @Bucimis I'm looking at how to get started. our project has developed many features on top of Expo, so unless there's no other option we really don't want to eject... Do you think the config-plugin way is doable? Will it be very complicated? Any information is appreciated.

wesleyorbin commented 2 years ago

@fantasyado I would follow along with the Expo docs and try it out. Based on what I'm seeing, it may be possible, but you'd likely have to use a mod to edit the AppDelegate for iOS and MainApplication for Android.

wesleyorbin commented 2 years ago

Hi @iboxgithub. I believe you may have meant to post this in another repo (maybe https://github.com/DoubleSymmetry/react-native-track-player?).

EvanBacon commented 2 years ago

@westhechiang if you have any feedback on Expo Config Plugins, I'd love to hear it! You can message me directly on Twitter @baconbrix or on Discord Bacon#8417.

I've run the feature request by the team to see if anyone on our side has availability.

giautm commented 2 years ago

Hi everyone 👋 , I'm going to help create an Expo plug-in for appboy-react-sdk. However, after I read the documentation, I noticed that some parts of the SDK need you to install with the native code. So if you need this feature, please ask the Bazel team for support.

https://www.braze.com/docs/developer_guide/platform_integration_guides/react_native/inapp_messages/#accessing-in-app-message-data

PS: I'll be submitting a PR in the next few days, so stay tuned. 😄

EvanBacon commented 2 years ago

The Braze team has asked that this feature be handled in-house and that existing customers reach out to them directly for support, so we must unfortunately stop working on this feature.

davidbielik commented 2 years ago

Hi @giautm and @EvanBacon thanks for your interest and willingness to contribute to a React Native/Expo integration.

I'll email you tomorrow to learn more about collaborating on this feature.

raffiot commented 2 years ago

Hi ! We are also going to use it at Cajoo, what is the current status of this track ? Thank you very much.

farkmarnum commented 2 years ago

Hi all! At Nayya, we also use Braze + Expo managed workflow, and we've been blocked from using Braze in our React Native app due to the lack of a config plugin.

In order to un-block, we've written a Expo config plugin for Braze 🚀. This plugin is likely not generalized enough to meet the needs of all Braze customers, and it could also certainly use some improvements from subject matter experts at Braze and Expo.

A few shortcomings of note:

That being said, we're sharing it as it may be a helpful starting place for other teams looking to write a config plugin until the Braze+Expo teams are able to release one for all customers. And it may be a helpful point of reference for you @davidbielik & @EvanBacon. Happy to chat through the approach and answer any questions.

davidbielik commented 2 years ago

Hi everyone,

Thanks for your patience on this feature request. I want to provide an update on our plans and timelines:

In August, we plan to be release an initial Expo Plugin which will include support for Content Cards, In-App Messages, Analytics, and Geofences.

Following that release, we'll be working towards adding plugin support for Push (the next month or so).

We'll update here with each milestone, and looking forward to your teams testing out the plugin and providing any feedback!

davidbielik commented 2 years ago

Hi, we're excited to release the first version of our Braze Expo Plugin! You can find our documentation here.

To get started, simply expo install @braze/expo-plugin and then pass in your configuration in your app.json file.

This initial release includes support for:

Next month we'll release our support for Push Notifications in the Javascript layer.

If you have time to test out the plugin, we'd appreciate any feedback you have or improvements we should make prior to the next release.

Thanks to @giautm for your initial draft which we based ours on!

davidbielik commented 2 years ago

Good news everyone! We're excited to announce @braze/expo-plugin@v0.4.0 and react-native-appboy-sdk@1.38.0 which now support Push Notifications via Braze.requestPushPermission(options).

You can read more about how to integrate this in our documentation. We hope this makes your Braze integration easier, with less native coding requirements.

Thanks again for all your feedback to help prioritize this, and if you have any questions or want to report any issues, feel free to open a github issue in our React Native SDK or our new Expo Plugin.