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
[ios][application] Migrate to Expo Modules API #24871
[ios][application] Migrate to Expo Modules API #24871
Conversation
245b70c
to
2bd6222
Compare
export enum ApplicationReleaseType { | ||
UNKNOWN = 0, | ||
SIMULATOR = 1, | ||
ENTERPRISE = 2, | ||
DEVELOPMENT = 3, | ||
AD_HOC = 4, | ||
APP_STORE = 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer the enum over type unions IMO (will defer to @tsapeta). If the issue is that the runtime values of the enums are human-unfriendly, we could make a breaking change to make them be strings (enum { UNKNOWN = 'UNKNOWN', ... }
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've left some feedback. For now, I think we won't make the breaking change
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
packages/expo-application/ios/ApplicationModuleProvisioningProfile.swift
Outdated
Show resolved
Hide resolved
737b85f
to
d13f7ed
Compare
d13f7ed
to
0d32d95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last few small things and should be good to go
Co-authored-by: Alan Hughes <30924086+alanjhughes@users.noreply.github.com>
Co-authored-by: Alan Hughes <30924086+alanjhughes@users.noreply.github.com>
Co-authored-by: Alan Hughes <30924086+alanjhughes@users.noreply.github.com>
Why
Migrate to expo modules API.
How
Followed typical migration steps.
There is a breaking change:
getIosPushNotificationServiceEnvironmentAsync()
now returns a string of a union type instead of an enum integer. I changed this because I thought it made more sense from a user perspective, it is recommended in the Expo Modules API documentation that way, and TypeScript enums should be avoided in general.Test Plan
Tested on my physical iPhone 11 Pro.
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).