Title: iOS Archive Export unexpected behavior when using AdHoc or AppStore provisioning · Issue #3020 · NativeScript/nativescript-cli · GitHub
Open Graph Title: iOS Archive Export unexpected behavior when using AdHoc or AppStore provisioning · Issue #3020 · NativeScript/nativescript-cli
X Title: iOS Archive Export unexpected behavior when using AdHoc or AppStore provisioning · Issue #3020 · NativeScript/nativescript-cli
Description: From Xcode 8.3+ the way IPA is built changed. The generation of the IPA is a two step process now: xcodebuild archive xcodebuild export Archive This makes an archive folder that has app, debug symbols, etc. It has all the artefacts neces...
Open Graph Description: From Xcode 8.3+ the way IPA is built changed. The generation of the IPA is a two step process now: xcodebuild archive xcodebuild export Archive This makes an archive folder that has app, debug symb...
X Description: From Xcode 8.3+ the way IPA is built changed. The generation of the IPA is a two step process now: xcodebuild archive xcodebuild export Archive This makes an archive folder that has app, debug symb...
Opengraph URL: https://github.com/NativeScript/nativescript-cli/issues/3020
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"iOS Archive Export unexpected behavior when using AdHoc or AppStore provisioning","articleBody":"From Xcode 8.3+ the way IPA is built changed.\r\nThe generation of the IPA is a two step process now:\r\n 1. `xcodebuild archive`\r\n 2. `xcodebuild export`\r\n\r\n#### Archive\r\nThis makes an archive folder that has app, debug symbols, etc. It has all the artefacts necessary to export for Development, Ad-Hoc or App Store distribution. The app is signed with the certificate and provisioning profiles set in the .xcconfig or in the xcodeproj (using the --provision option).\r\n\r\n#### Export\r\nThis takes the archive and exports IPA for Development, Ad-Hoc or AppStore. During the export, the app is often resigned with a distribution certificate and an ad-hoc or AppStore distribution provisioning profile.\r\n\r\n## Problems\r\nCurrently the CLI does archive then export for development when `tns build|run` is issued. This leads to underwhelming results when developers try to publish at the store or export for ad-hoc using `tns build`. Why? During the export session the xcodebuild command accepts an `-exportOptionsPlist` that can contain keys listed in [`xcodebuild --help`](https://gist.github.com/PanayotCankov/3c81cf106c8b7bb5efa3ad05d9731abe). Most importantly the: `method : String`:\r\n\r\n> Describes how Xcode should export the archive. Available options: app-store, package, ad-hoc, enterprise, development, and developer-id. The list of options varies based on the type of archive. Defaults to development.\r\n\r\nThe default is \"development\", for exportOptionsPlist currently the app/App_Resources/Info.plist is currently provided (IMO incorrectly) and it has no `method` key, so `development` is used as fallback. When the developers configure the .xcconfig to use Ad-Hoc or AppStore provisioning profile, the export is still performed as development, the result IPA is then incorrectly set to still use development settings such as entitlements.\r\n\r\nHere are the related issues to exactly this problem:\r\n - https://github.com/NativeScript/nativescript-cli/issues/2888\r\n - https://github.com/NativeScript/nativescript-cli/issues/2999 \r\n (perhaps incorrectly?) tries to provide distribution certificate for archive, while archive should be performed with development certificate and export should sign with distribution certificate\r\n - https://github.com/NativeScript/nativescript-cli/issues/2922\r\n Signes multitarget app with the AppStore distribution, there is a bug in old Ruby and Cocoapods that leads to this\r\n - https://github.com/NativeScript/nativescript-cli/issues/2888\r\n Building with --release as mentioned still exports with method: development\r\n - https://github.com/NativeScript/nativescript-cli/issues/2716\r\n - https://github.com/NativeScript/nativescript-cli/issues/2702\r\n Similar to 2922 - resolved by ruby and cocoapods update but also the missing exportOptionsPlist is noted in warnings\r\n\r\nWe have discussed internally that adding `tns archive` + `tns export` would diverge too much from the current and Android build commands, also people shouldn't care how the build is implemented internally.\r\n\r\nHere are some clues how this can be addressed:\r\nThe export during `tns build ios` is done here:\r\nhttps://github.com/NativeScript/nativescript-cli/blob/1955028ac3ded6a012813476f08d0f4f0d89dddd/lib/services/ios-project-service.ts#L259-L263\r\nIt incorrectly gets the app/App_Resources/Info.plist as exportOptionsPlist. Instead such export.plist files should be generated somewhere in the platforms/ios/build similar to the exportArchive that is currently used only for distribution:\r\nhttps://github.com/NativeScript/nativescript-cli/blob/1955028ac3ded6a012813476f08d0f4f0d89dddd/lib/services/ios-project-service.ts#L212-L229\r\nThe method - Ad-Hoc or AppStore distribution that should be used during `tns build ios` should either be provided through an option, or inferred from the provisioning profile used during the build.","author":{"url":"https://github.com/PanayotCankov","@type":"Person","name":"PanayotCankov"},"datePublished":"2017-07-31T11:03:41Z","url":"https://github.com/NativeScript/nativescript-cli/issues/3020"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:697d8685-9753-65d6-ce52-c00adb25a42d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF6A:2A5566:4301C6:57A353:6B0195C7 |
| html-safe-nonce | e1c4802e836dd960f19a7407ef0d43cec12a3fe7fee09ba7f33a67f9c68a0440 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjZBOjJBNTU2Njo0MzAxQzY6NTdBMzUzOjZCMDE5NUM3IiwidmlzaXRvcl9pZCI6IjQ1OTYzMzgzMDI0ODI3NDg4NzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f99247d44315cbf58dabf6a4384ecf2715850c7b31710e8bcee11f99b1d86b0 |
| hovercard-subject-tag | issue:246720351 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-cli/3020/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d4f33f81c8e850041362ad8903802652ecab00c2228d959306223942269819c/NativeScript/nativescript-cli/issues/3020 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d4f33f81c8e850041362ad8903802652ecab00c2228d959306223942269819c/NativeScript/nativescript-cli/issues/3020 |
| og:image:alt | From Xcode 8.3+ the way IPA is built changed. The generation of the IPA is a two step process now: xcodebuild archive xcodebuild export Archive This makes an archive folder that has app, debug symb... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PanayotCankov |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 21347346 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21347346 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width