Open alessiolapenna opened 1 year ago
I have the same issue hope there is a solution soon. as a side node the issue is also when you run the xcodebuild command locally
xcodebuild -workspace ./MyApp.xcworkspace -scheme MyApp -sdk 'iphoneos16.2' -destination 'generic/platform=iOS' -archivePath MyApp.xcarchive -skipPackagePluginValidation clean archive
Got the same issue, please help.
I got this issue as well on my local machine
I have the same problems for last two days, did anyone managed to fix it or is there a planned fix by the package owners itself?
i figured out it happens when you build the executableTarget()
for the plugin when you remove the build plugin the archive is working. I think thats the case because the Plugin is Compiled for macOS to execute and the archive is a build for iOS.
A possible workaround would be to include the executable target prebuild in the Package.swift SwiftLint had the same problem and they fixed it with that approach.
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.50.3/SwiftLintBinary-macos.artifactbundle.zip",
checksum: "abe7c0bb505d26c232b565c3b1b4a01a8d1a38d86846e788c4d02f0b1042a904"
)
Removing the -sdk 'iphoneos16.2'
option from xcodebuild
should fix the issue.
The app will still be build for iOS because of the specified destination.
We could indeed think about shipping a prebuilt binary, if only to avoid this scenario, because multiple people have already run into this.
I think that shipping a prebuild binary is the solution to go IMHO. SwiftLint solved the same issue in the same way and it works well indeed.
Is there any update for a solution for this? Or is there a workaround?
This is currently blocking us from using Firebase Test Labs with our CI as this requires code to be built using xcodebuild with the SDK set to -sdk iphoneos
.
In my case the xcode build command doesn't contain the -sdk parameter so the workaround doesn't work for me. Is there any way we can have this fixed in the future?
My command is this: xcodebuild -resolvePackageDependencies -scheme Prod -project App.xcodeproj -configuration ProdRelease
A workaround is to not use the build plugin, but instead run the command plugin manually.
This is not gonna help when on CI. I can build correctly when i'm doing it locally. even when archiving locally. the problem arises only when building on CI (Github Actions)
I had the same issue. Archive worked fine locally but failed on CI (GitHub actions + Fastlane).
The issue was solved after removing sdk
parameter from the fastlane build_ios_app
function call.
I'm trying to migrate R.swift to the latest version using the plugin import method. On local workstations it works fine. Even the archive is completed correctly. But when i run this in the Github action that we use for CI it can never complete an archive. The r.generated file is correctly written, but when compiled it cannot find the RswiftResources module, causing the compilation process to fail.
I tried using a project or switching to a workspace. Tried messing with various build settings, but nothing seems to work.
From what I can see the plugin is configured correctly as it has no problem locally in debug or archive. Maybe there is some "fixed" path that is necessary and when running in CI there is some problem with the location where this library is created and located?