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

[application] Clarify that getIosPushNotificationServiceEnvironmentAsync returns null on the simulator #18282

Merged
merged 3 commits into from
Jul 18, 2022

Conversation

tsapeta
Copy link
Member

@tsapeta tsapeta commented Jul 18, 2022

Why

The docs say that Application.getIosPushNotificationServiceEnvironmentAsync returns "development" or "production". However, since the simulator doesn't support push notifications, it returns undefined in that case.

How

  • Explicitly return null instead of undefined on the simulator (and backported this change to SDK46)
  • Clarify in the docs that it can return null
  • Fixed test-suite test that expected a string
  • Regenerated API docs for this package (also for SDK46)

Test Plan

Now the updated test passes on the simulator

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 18, 2022
@tsapeta tsapeta marked this pull request as ready for review July 18, 2022 16:14
@tsapeta tsapeta requested a review from ide as a code owner July 18, 2022 16:14
@tsapeta tsapeta requested a review from brentvatne July 18, 2022 16:14
packages/expo-application/src/Application.ts Outdated Show resolved Hide resolved
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: James Ide <ide@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jul 18, 2022
@tsapeta tsapeta merged commit 6c04e51 into main Jul 18, 2022
@tsapeta tsapeta deleted the @tsapeta/fix-notification-service-env branch July 18, 2022 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants