Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo Plugin #563

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Expo Plugin #563

wants to merge 7 commits into from

Conversation

larcho
Copy link
Contributor

@larcho larcho commented Nov 13, 2024

This extension in the React Native Module would add the Expo Plugin for automating adding the Notification Service to the app. This would safe all the "native" effort required for setting it up. Also, this does not interfere with non Expo projects, since the plugin gets added in Expo specific configurations (app.plugin.js).

Personally I don't like doing huge PRs and would do the Android bit in a separate PR. This should be safe to merge and shouldn't affect current Vanilla React Native implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eeeek, will doublecheck if .lock needs to change so much. My guess it's the addition of expo.

@dangeross
Copy link
Collaborator

This is really cool @larcho! I have to figure out how to test this.

@larcho
Copy link
Contributor Author

larcho commented Nov 13, 2024

This is really cool @larcho! I have to figure out how to test this.

Maybe I can set something up like the already existing example for bare react native.

@larcho
Copy link
Contributor Author

larcho commented Nov 14, 2024

@dangeross I added a example-expo project as you might have noticed. It also has a script called prebuild:ios that builds the ios folder with the XCodeProject, adding the target as well.

I'm not able to currently build it though, since there's something weird going on with the LiquidMapper file on my end. (I'm using yarn link to use the local version).

@larcho
Copy link
Contributor Author

larcho commented Nov 14, 2024

@dangeross I added a example-expo project as you might have noticed. It also has a script called prebuild:ios that builds the ios folder with the XCodeProject, adding the target as well.

I'm not able to currently build it though, since there's something weird going on with the LiquidMapper file on my end. (I'm using yarn link to use the local version).

It's able to resolve AesSuccessActionData

@larcho
Copy link
Contributor Author

larcho commented Nov 15, 2024

@dangeross I added a example-expo project as you might have noticed. It also has a script called prebuild:ios that builds the ios folder with the XCodeProject, adding the target as well.
I'm not able to currently build it though, since there's something weird going on with the LiquidMapper file on my end. (I'm using yarn link to use the local version).

It's able to resolve AesSuccessActionData

@dangeross I spotted the issue, maybe you can hint me how you deal with versions in the SDK. If you currently look at the main branch you'll notice that the version for the package is 0.4.0-rc3, which also pulls the BreezSDKLiquid for that version. That required Pod though does not have the struct AesSuccessActionData yet which causes my build to fail.

I think struct AesSuccessActionData is something from version 0.5.0 right?

@dangeross
Copy link
Collaborator

I think struct AesSuccessActionData is something from version 0.5.0 right?

@larcho Yes it was added from 0.5.0-rc1

I think this is just a local testing issue. You can bump the react-native/package.json version up to 0.5.0-rc4

@larcho
Copy link
Contributor Author

larcho commented Nov 15, 2024

I think struct AesSuccessActionData is something from version 0.5.0 right?

@larcho Yes it was added from 0.5.0-rc1

I think this is just a local testing issue. You can bump the react-native/package.json version up to 0.5.0-rc4

Adjusting the the package version solved the problem.

@larcho larcho marked this pull request as ready for review November 15, 2024 18:52
Copy link
Collaborator

@dangeross dangeross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting this error running yarn ios, I ran yarn in react-nativeandreact-naive/example-expo` first:

Error: Cannot find module './plugin/build'

Am I missing a step?

}

// Get API Key
const apiKey = process.env.EXPO_PUBLIC_API_KEY
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename this to BREEZ_API_KEY. I wasn't sure if I needed an Expo API key at first

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, looks confusing. By the way, anything that starts with EXPO_PUBLIC in Expo will be also exposed during runtime. I'll rename it to EXPO_PUBLIC_BREEZ_API_KEY.

@larcho
Copy link
Contributor Author

larcho commented Nov 18, 2024

I'm getting this error running yarn ios, I ran yarn in react-nativeandreact-naive/example-expo` first:

Error: Cannot find module './plugin/build'

Am I missing a step?

yup yarn plugin:build Which I think can be attached during npm publishing. You'll also notice in the example project I'm linking the library using file: which we might not want but during development it might be easier to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants