René's URL Explorer Experiment


Title: Distribution build for watch target fails · Issue #5291 · NativeScript/nativescript-cli · GitHub

Open Graph Title: Distribution build for watch target fails · Issue #5291 · NativeScript/nativescript-cli

X Title: Distribution build for watch target fails · Issue #5291 · NativeScript/nativescript-cli

Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.4.1 Cross-platform modules: 6.4.2 iOS Run...

Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.4...

X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.4...

Opengraph URL: https://github.com/NativeScript/nativescript-cli/issues/5291

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Distribution build for watch target fails","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: 6.4.1\r\n - Cross-platform modules: 6.4.2\r\n - iOS Runtime: 6.4.2\r\n\r\n**Describe the bug**\r\n\u003c!-- A clear and concise description of what the bug is. Please, explain whether it's a build time error or a runtime error. More detailed logs can be easily obtained by following the instructions in this guide: https://docs.nativescript.org/get-support#how-to-obtain-diagnostic-reports. --\u003e\r\nI have added a watch project to my Nativescript project by following the instructions from here #4589 . I can successfully run `tns prepare ios` and the watch project is included in the xcode project afterwards. \r\nI am using manual code signing to sign the iOS app as well as the watchOS app. Which both works perfectly fine as long as I do a development build. \r\n\r\nBut once I try to run the distribution build by providing the distribution profile via the `--provision` option I get the following error:\r\n\r\nerror: Provisioning profile \"Generic Profile for Internal Deployment\" doesn't include signing certificate \"Apple Development: John Doe (XXXXX)\". (in target 'watchapp Extension' from project '...')\r\n\r\nSo it looks like Provisioning Profile is updated but the wrong signing certificate is used. So looking into the autogenerated project.pbxproj reveals the following build setting for the watchapp and watchextension:\r\n`\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution\";`\r\n\r\nThis will apply the code settings only to iOS SDK targets. And hence the signing certificates for the watch project don't get updated. Changing the build setting for the watch targets to \r\n`\"CODE_SIGN_IDENTITY\" = \"iPhone Distribution\";`\r\nfixes the problem. \r\n\r\nI assume the fix could be done simply by checking for the target in here:\r\n[pbxproj-dom](https://github.com/NativeScript/pbxproj-dom/blob/master/xcode.ts#L182)\r\n\r\nUnfortunately the code signing still fails for the distribution build after this fix. The `--provision` option makes sure that the correct provisioning profile is used when exporting the archive and building the ipa. \r\nThis is done by passing an exportOptions.plist file to xcodebuild. \r\n\r\nThis file is autogenerated by Nativescript during the tns build and it needs to state the correct provisioning profile for each target. But unfortunately the [export-options-plist-service.ts](https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/ios/export-options-plist-service.ts#L66) provides only the profile for the iOS target. And therefore the archive export fails with the follwoing error:\r\n\r\nError Domain=IDEProvisioningErrorDomain Code=9 \"\"watchapp.app\" requires a provisioning profile.\" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=\"watchapp.app\" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}\r\n\r\nAdding the following lines in export-options-plist-service.ts fixes the issue \r\n``\u003ckey\u003e${projectData.projectIdentifiers.ios}.watchkitapp\u003c/key\u003e\r\n   \u003cstring\u003e${provision}\u003c/string\u003e\r\n   \u003ckey\u003e${projectData.projectIdentifiers.ios}.watchkitapp.watchkitextension\u003c/key\u003e\r\n   \u003cstring\u003e${provision}\u003c/string\u003e``\r\n\r\n\r\n\r\n**To Reproduce**\r\nRun Nativescript project with watch extension and provide distribution profile via the `--provision` option\r\n\r\n**Expected behavior**\r\nipa should be successfully created and signed \r\n\r\n","author":{"url":"https://github.com/siewedu","@type":"Person","name":"siewedu"},"datePublished":"2020-04-06T15:00:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/5291/nativescript-cli/issues/5291"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a18517b2-a9f2-e807-912f-123b8dd9c385
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA95C:1B78C0:5EEC9:7D173:696B5A70
html-safe-nonce35b1d70050ef5d6522ff77c0ab20dcf2cd5e7ab7862a5d9189d7d71af4caae73
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTVDOjFCNzhDMDo1RUVDOTo3RDE3Mzo2OTZCNUE3MCIsInZpc2l0b3JfaWQiOiI3Nzc3MDAxMTA2ODgwMjg5MzkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbd4160c64457eaa028336ba8074cc53efa8e993544cd2c7ca08daad63c35dd45
hovercard-subject-tagissue:595190033
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-cli/5291/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e51d40b40d022a45bd1e74c4eb4f541871ccab22b55bd09074cc8fd2b26ca49f/NativeScript/nativescript-cli/issues/5291
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e51d40b40d022a45bd1e74c4eb4f541871ccab22b55bd09074cc8fd2b26ca49f/NativeScript/nativescript-cli/issues/5291
og:image:altEnvironment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.4...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesiewedu
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id21347346
octolytics-dimension-repository_nwoNativeScript/nativescript-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21347346
octolytics-dimension-repository_network_root_nwoNativeScript/nativescript-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/nativescript-cli/issues/5291#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fnativescript-cli%2Fissues%2F5291
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fnativescript-cli%2Fissues%2F5291
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2Fnativescript-cli
Reloadhttps://github.com/NativeScript/nativescript-cli/issues/5291
Reloadhttps://github.com/NativeScript/nativescript-cli/issues/5291
Reloadhttps://github.com/NativeScript/nativescript-cli/issues/5291
NativeScript https://github.com/NativeScript
nativescript-clihttps://github.com/NativeScript/nativescript-cli
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/issues/5291
Notifications https://github.com/login?return_to=%2FNativeScript%2Fnativescript-cli
Fork 198 https://github.com/login?return_to=%2FNativeScript%2Fnativescript-cli
Star 1k https://github.com/login?return_to=%2FNativeScript%2Fnativescript-cli
Code https://github.com/NativeScript/nativescript-cli
Issues 361 https://github.com/NativeScript/nativescript-cli/issues
Pull requests 13 https://github.com/NativeScript/nativescript-cli/pulls
Actions https://github.com/NativeScript/nativescript-cli/actions
Projects 0 https://github.com/NativeScript/nativescript-cli/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/NativeScript/nativescript-cli/security
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/issues/5291
Insights https://github.com/NativeScript/nativescript-cli/pulse
Code https://github.com/NativeScript/nativescript-cli
Issues https://github.com/NativeScript/nativescript-cli/issues
Pull requests https://github.com/NativeScript/nativescript-cli/pulls
Actions https://github.com/NativeScript/nativescript-cli/actions
Projects https://github.com/NativeScript/nativescript-cli/projects
Security https://github.com/NativeScript/nativescript-cli/security
Insights https://github.com/NativeScript/nativescript-cli/pulse
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/nativescript-cli/issues/5291
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/nativescript-cli/issues/5291
Distribution build for watch target failshttps://github.com/NativeScript/nativescript-cli/issues/5291#top
bughttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22bug%22
os: ioshttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22os%3A%20ios%22
https://github.com/siewedu
https://github.com/siewedu
sieweduhttps://github.com/siewedu
on Apr 6, 2020https://github.com/NativeScript/nativescript-cli/issues/5291#issue-595190033
#4589https://github.com/NativeScript/nativescript-cli/issues/4589
pbxproj-domhttps://github.com/NativeScript/pbxproj-dom/blob/master/xcode.ts#L182
export-options-plist-service.tshttps://github.com/NativeScript/nativescript-cli/blob/master/lib/services/ios/export-options-plist-service.ts#L66
bughttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22bug%22
os: ioshttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22os%3A%20ios%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.