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
pod spec lint fails to find matching XCFramework slice for a vendored library dependency #10204
Comments
Experiencing a similar issue with BugfenderSDK dependency... |
Experiencing the same issue with Didomi-XCFramework dependency. Did you find any workaround? |
After a closer look at the xcframework bash scripts and what they do, it seems that instead of copying the This issue might be related to #9525. |
Yes. But it's so ugly that I even hesitate to call it a workaround. Details here. |
I also am experiencing this exact issue. I was using Xcode 12.x command line tools and can verify the above statement. If I used the Xcode 11 command line tools I did NOT receive the error and was able to |
Just an FYI, my instance of this issue (personal private pod with BugfenderSDK as a dependency) magically went away when I updated to the latest cocoapods version (I am not sure if a BugfenderSDK change came along the way, but I don't think it did). Not saying it's fixed everywhere, but if you haven't tried in the past 3 weeks, you might kick the tires and see if there's been any improvement. |
@mharlowfod - thanks for that. I am using v1.10.1, and just solved my issue this morning. |
This issue is still occurring for me with v1.10.1 when trying to include BlackBerryDynamics.xcframework:
|
Same issue here. I have a private pod with an xcframework dependency and the linting fails with the same. CocoaPods 1.10.1 |
Same here when lint or push a pod with a binary xcframework (without i386 arch) dependency. For now, I add Hope |
@dnkoutso is this something I can help with? I'd be happy to submit a patch but honestly have no idea where to even start. With a bit of guidance I'd be happy to help |
After doing some digging and logging, I'm able to reproduce this when building for a simulator on an M1 mac and there is no slice in the xcframework with the |
I am also facing the same issue. Cocoapod 1.10.2 |
I am just trying to push or lint this https://github.com/MappCloud/MappSDK and facing the same issue. Cocoa pods 1.11.2 Does someone found solution or workaround? |
I think the ideal behavior for this should be to just fall back to the |
+1 |
+1 Cocoa pods 1.11.2 Xcode 13.1 Facing similar issue, and haven't found a solution yet:
|
The The root cause is that the XCFramework is missing an When running The solution is to add support for arm64 simulators to the binary. If you're unable to do so, you can use the workaround described in #10104 (comment) to explicitly disallow arm64 simulators from using the binary. This however should be a temporary measure, because the number of developers with Apple Silicon machines is growing faster and faster. |
I met this issue before when I tried to publish a pod library that depends on another binary vendored no-arm64-simulator-arch dependency. After some digging, I successfully published my library by using an ugly workaround. Here I'd like to share something and hope this could help someone. Many people mentioned below solution: s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } But it can not work at all. Configuring Then: s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } I'd like to say this is a terrible way. From the doc of
For instance, one pod has: s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } and another pod has: s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64' } If the user integrate these two pod libraries,
The only solution for this issue is to ask the vendor to rebuild their pod library for the arm64-simulator architecture and publish the library with XCFramework format which is the only format can bundle arm64-device and arm64-simulator together. Before the vendor updates their library, we may modify the CocoaPods source code to skip validating when publishing our library. Below is my ugly workaround: In order not to modify the global installed def xcodebuild(action, scheme, configuration, deployment_target:)
require 'fourflusher'
command = %W(clean #{action} -workspace #{File.join(validation_dir, 'App.xcworkspace')} -scheme #{scheme} -configuration #{configuration})
+ command += %w(-usage) Then the validator will build the app using This modification just skips building, not the whole validation. You may see compare between CocoaPods' Then anyone can use this fork to publish their library, via bundle init
bundle add cocoapods --git https://github.com/ElfSundae/CocoaPods.git --branch hack
bundle exec pod repo push
rm Gemfile Gemfile.lock
In addition, this is an example of publishing podspec using GitHub workflow: https://github.com/ElfSundae/NIM_iOS_UIKit/blob/master/.github/workflows/publish-podspec.yml |
Hello @ElfSundae , I tried to execute |
@dzmitry-antonenka For bundler 1.17, you may change bundle add cocoapods --git https://github.com/ElfSundae/CocoaPods.git --branch hack to echo 'gem "cocoapods", "~> 1.11", :git => "https://github.com/ElfSundae/CocoaPods.git", :branch => "hack"' >> Gemfile
bundle install |
Report
What did you do?
Run
pod spec lint
on a spec that contains a xcframework dependency.What did you expect to happen?
The lint should have passed.
What happened instead?
The
xcodebuild
command failed withI also noticed this note in the
pod spec lint
command output:If you download the VerIDCore dependency you'll find it contains slices for armv7, arm64, i386 and x86_64.
Also worth mentioning is that I successfully integrated the VerIDCore dependency in a project. It's only if it's set as a dependency of another podspec that the podspec's lint fails.
CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
Github link
The text was updated successfully, but these errors were encountered: