Title: Xcode build archive fails · Issue #79 · SwiftyLab/MetaCodable · GitHub
Open Graph Title: Xcode build archive fails · Issue #79 · SwiftyLab/MetaCodable
X Title: Xcode build archive fails · Issue #79 · SwiftyLab/MetaCodable
Description: I have read the documentation. Describe the bug xcodebuild archive fails in the following scenario. To Reproduce Steps to reproduce the behavior: Create a Swift Package, which depends on MetaCodable Create a Target which depends on MetaC...
Open Graph Description: I have read the documentation. Describe the bug xcodebuild archive fails in the following scenario. To Reproduce Steps to reproduce the behavior: Create a Swift Package, which depends on MetaCodabl...
X Description: I have read the documentation. Describe the bug xcodebuild archive fails in the following scenario. To Reproduce Steps to reproduce the behavior: Create a Swift Package, which depends on MetaCodabl...
Opengraph URL: https://github.com/SwiftyLab/MetaCodable/issues/79
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Xcode build archive fails","articleBody":"- [x] I have read the [documentation](https://swiftpackageindex.com/SwiftyLab/MetaCodable/main/documentation/metacodable).\r\n\r\n**Describe the bug**\r\n`xcodebuild archive` fails in the following scenario.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Create a Swift Package, which depends on MetaCodable\r\n2. Create a Target which depends on `MetaCodable`, `HelperCoders` and uses the `MetaProtocolCodable` plugin.\r\n3. Include this target as a product of the package\r\n4. Add types into the target which make use of dynamic data variations, in particular Step 9 from the tutorial: https://swiftpackageindex.com/swiftylab/metacodable/v1.3.0/tutorials/metacodable/dynamic\r\n5. Create an Xcode project for an iOS app which imports the product from the package.\r\n6. Add code-signing for your app\r\n7. Build and Archive from Xcode Product menu (or using `xcodebuild archive`)\r\n\r\n\r\n**Expected behavior**\r\nI should be able to archive the product.\r\n\r\n**Actual behaviour**\r\nBuild script fails because build tools cannot find the executable tool `ProtocolGen`.\r\n\r\n\r\n\u003e Showing All Issues\r\n\u003e sandbox-exec: execvp() of '//Users/daniel/Library/Developer/Xcode/DerivedData/Posts-aaxhnzolyyfxrgcsibzfeeijakbj/Build/Intermediates.noindex/ArchiveIntermediates/Posts/BuildProductsPath/Release/ProtocolGen' failed: No such file or directory\r\n\u003e \r\n\r\n**Screenshots**\r\n\r\n\u003cimg width=\"1033\" alt=\"Screenshot 2024-05-01 at 11 17 44\" src=\"https://github.com/SwiftyLab/MetaCodable/assets/309420/a369090c-cb30-4cac-8251-6feb921bef3b\"\u003e\r\n\r\n\r\n**Environment (please complete the following information, remove ones not applicable):**\r\n - OS: macOS\r\n - Version 14.4.1 (23E224)\r\n - Xcode Version 15.3 (15E204a)\r\n - Swift $ swift -version\r\nswift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)\r\nTarget: arm64-apple-macosx14.0\r\n - CocoaPods N/A\r\n\r\n**Additional context**\r\nI have created a small project to demonstrate this issue: https://github.com/danthorpe/metacodable_demo\r\n\r\nA possible solution, would be to export `ProtocolGen` as a Swift artefact bundle, and reference this as a binary target in your Package.swift. e.g. how [SwiftLint is packaged](https://github.com/realm/SwiftLint/blob/99a990d88f06ec8bdef292299121110ef1f3d264/Package.swift#L11). In this project, on macOS, the dependency is a binary target instead of the source code executable.","author":{"url":"https://github.com/danthorpe","@type":"Person","name":"danthorpe"},"datePublished":"2024-05-01T10:48:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/79/MetaCodable/issues/79"}
| 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:544a3d58-58b1-b8c2-fab7-3ff98f0201ea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E950:D5FCA:BAFC92:FC4997:698E4142 |
| html-safe-nonce | 3cfecadb0d08926abfb491c0ee541873e6b3121a747439dbe9c9dc089d3b6639 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTUwOkQ1RkNBOkJBRkM5MjpGQzQ5OTc6Njk4RTQxNDIiLCJ2aXNpdG9yX2lkIjoiNjg3ODU5Nzk2ODM3MjMxODUzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 018fb1ef058ef5d19b45f4c9c362c1b9888fea15f3943e7fe434ebb7834810a6 |
| hovercard-subject-tag | issue:2273315190 |
| 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/SwiftyLab/MetaCodable/79/issue_layout |
| twitter:image | https://opengraph.githubassets.com/57a44181d6a75e50ba4a519534427e0fc340d9523a292fbc6ded8689f092c802/SwiftyLab/MetaCodable/issues/79 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/57a44181d6a75e50ba4a519534427e0fc340d9523a292fbc6ded8689f092c802/SwiftyLab/MetaCodable/issues/79 |
| og:image:alt | I have read the documentation. Describe the bug xcodebuild archive fails in the following scenario. To Reproduce Steps to reproduce the behavior: Create a Swift Package, which depends on MetaCodabl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danthorpe |
| hostname | github.com |
| expected-hostname | github.com |
| None | a5632af64f7fed7bff1d6a428d1aca1b94fa7a48f760de2d39d9b1effdbf0082 |
| turbo-cache-control | no-preview |
| go-import | github.com/SwiftyLab/MetaCodable git https://github.com/SwiftyLab/MetaCodable.git |
| octolytics-dimension-user_id | 106015847 |
| octolytics-dimension-user_login | SwiftyLab |
| octolytics-dimension-repository_id | 655068226 |
| octolytics-dimension-repository_nwo | SwiftyLab/MetaCodable |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 655068226 |
| octolytics-dimension-repository_network_root_nwo | SwiftyLab/MetaCodable |
| 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 | 3dda52e29a416820ced574e74040033b820613a2 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width