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
'Prepare Artifacts' stage failed to find .xcframework slice for 'armv7k arm64_32' architectures #9569
Comments
Likely related to building for multiple architectures at once - will try to reproduce this myself but a sample would be helpful |
Ok able to reproduce locally. Seems to be caused by the watchOS extension target specifically. We can do the transformation of |
…selected for watchOS extensions Closes #9569
…selected for watchOS extensions Closes #9569
…selected for watchOS extensions Closes #9569
This also fixes armv7 arm64 iOS slices. For anyone who wonders if they should update. Spent half of the day digging into this just to find out it was already fixed. |
That’s good to know, thanks for posting |
I don't think this is the best fix. What if the XCFramework slice contains more archs than you are building for? Then it still won't find the correct slice. I will try to fix. |
Report
Cocoapods script for artifacts fails to correctly find the slice for 'armv7k arm64_32' architectures in a .xcframework.
What did you do?
The resulted .xcframework had the following structure:
MyFramework.xcframework
- Info.plist
- watchos-armv7k_arm64_32
- watchos-i386-simulator
pod 'MyFramework', :path => "<PATH_TO_MY_PODSPEC>"
pod install
, everything went smooth.What did you expect to happen?
The test app should have run on the watch device.
What happened instead?
Watch app crashed:
dyld: dependent dylib '@rpath/MyFramework.framework/MyFramework' not found for '/private/var/containers/Bundle/Application/[UUID]/TestFrm2 WatchKit App.app/PlugIns/TestFrm2 WatchKit Extension.appex/TestFrm2 WatchKit Extension', tried but didn't find: ...
Build log showed:
[CP] Unable to find matching .xcframework slice in 'true watchos-armv7k_arm64_32/MyFramework.framework watchos-i386-simulator/MyFramework.framework' for the current build architectures (armv7k arm64_32).
CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
Workaround this issues
If I modify the MyFramework.xcframework structure to this:
And also modify the Info.plist's LibraryIdentifier from 'watchos-armv7k_arm64_32' to 'watchos-armv7k arm64_32' the [CP] Prepare Artifacts will run with no warning and the extension runs on the device.
It appears that issue resides in the [CP] Prepare Artifacts script at line 94 where
target_arch is 'armv7k arm64_32' but does not match any value from:
'true watchos-armv7k_arm64_32/MyFramework.framework watchos-i386-simulator/MyFramework.framework'
When running for simulator everything is ok: target_arch is 'i386-simulator' and matches 'watchos-i386-simulator/MyFramework.framework' value.
The text was updated successfully, but these errors were encountered: