-
Notifications
You must be signed in to change notification settings - Fork 93
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
Dynamically toggle capabilities before build #384
Dynamically toggle capabilities before build #384
Conversation
Size Change: +4.21 kB (0%) Total Size: 33 MB
|
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.
this looks good to me. one concern i have about continuing to go down this road is that it's not clear how a third party lib using a config plugin to add a feature that depends on a capability would be able to work w/o modifying eas-cli like this. maybe we could add a more generic correction - we already have ios.capabilities
key in the future?ios.entitlements
packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/actions/SetupBuildCredentials.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/actions/SetupBuildCredentials.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/actions/SetupBuildCredentials.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/actions/SetupBuildCredentials.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/actions/SetupBuildCredentials.ts
Outdated
Show resolved
Hide resolved
i spoke with @EvanBacon about this stuff today and i'm generally on board with changes. there's additional work being on on the expo-cli repo but this can ship independently. |
packages/eas-cli/src/credentials/ios/actions/SetupBuildCredentials.ts
Outdated
Show resolved
Hide resolved
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.
It generally looks good but please address my comments before merging to make the code easier to follow.
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts
Outdated
Show resolved
Hide resolved
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.
lgtm, but please get wojtek/dominik to approve this first before merging !
packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts
Outdated
Show resolved
Hide resolved
Is this supposed to work with |
Now I see EAS |
@flow-danny - sorry can you elaborate on what you experienced? i'd like to understand what happened in your situation |
We have a regular managed Expo app and tried EAS for the first time.
We didn't have any custom entitlements configured, just `usesIcloudStorage` set to true as documented here https://docs.expo.io/versions/latest/sdk/document-picker/
(But in the typescript version if app.json)
iCloud entitlements get disabled during the syncing process until after we added these to the entitlements config. I used expo eject and Xcode to figure out the entitlement keys that we needed.
…On 24 May 2021, 06:54 +0400, Brent Vatne ***@***.***>, wrote:
@flow-danny - sorry can you elaborate on what you experienced? i'd like to understand what happened in your situation
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
if anyone runs into issues with capability syncing, you can disable it with |
Checklist
Why
If a capability is defined in the entitlements file but not registered with Apple, the build will fail. This PR aims to reduce the possibility of that happening by checking the native entitlements file and enabling/disabling capabilities.
Fixes expo/expo-cli#3448 for
eas build
How
ios.entitlements
object, defaulting to the template object (which always enables push notifications). This needs to be improved further in expo/config to allow reading of evaluated entitlements automatically (can implement in another PR).Example
If the user has associatedDomains defined in their entitlements file, then in their app.json then enable/disable the capability remotely before building. Without this feature the build fails.
With this feature the build works.
Test Plan
Wrote unit tests for the request and assembly.
In a managed project's
app.json
:eas build -p ios
, after capabilities sync, check to see if889YZVZQDS_ASSOCIATED_DOMAINS
is defined (my app's opaque id is889YZVZQDS
).entitlements
and reruneas build
, the syncing step should remove the capability.Visually, this is the scope of automatic functionality: