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

[notifications] Add support for custom managed workflow #12465

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Apr 8, 2021

Why

The bare workflow must support notifications out of the box in order to use managed EAS build. This PR implements support for bare workflow after landing this expo/config change and updating expo-constants expo/expo-cli#3376

How

Use currentFullName || id instead of id to get the legacy managed project id.

Test Plan

  • TBD

@EvanBacon EvanBacon changed the title [notifications] added support for currentFullName [notifications] Add support for custom managed workflow Apr 8, 2021
@EvanBacon EvanBacon marked this pull request as ready for review April 9, 2021 05:25
@EvanBacon EvanBacon requested a review from cruzach as a code owner April 9, 2021 05:25
@EvanBacon EvanBacon merged commit 7b8b8fa into master Apr 9, 2021
@EvanBacon EvanBacon deleted the @evanbacon/expo-notifications/added-support-for-currentFullName branch April 9, 2021 05:26
@@ -30,7 +30,8 @@ export default async function getExpoPushTokenAsync(options: Options = {}): Prom

const deviceId = options.deviceId || (await getDeviceIdAsync());

const experienceId = options.experienceId || (Constants.manifest && Constants.manifest.id);
const experienceId =
options.experienceId || Constants.manifest?.currentFullName || Constants.manifest?.id;
Copy link
Contributor

@cruzach cruzach Apr 9, 2021

Choose a reason for hiding this comment

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

Just in case there are any differences introduced in Constants.manifest?.currentFullName, shouldn't we change this to

options.experienceId || Constants.manifest?.id || Constants.manifest?.currentFullName;

so on the off chance there's a bug with Constants.manifest?.currentFullName, we don't change existing users' push tokens

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added my thoughts to the universe PR, linked below.

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.

3 participants