Skip to content
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

Xcode 15 beta 6 pod repo push fails with deployment target too low #12033

Open
adamszeremeta opened this issue Aug 17, 2023 · 28 comments · Fixed by dshikulin-mwb/CocoaPods#1
Open

Comments

@adamszeremeta
Copy link

Report

What did you do?

Run 'pod repo push'

What did you expect to happen?

Successful pod validation and push

What happened instead?

Xcodebuild returned an error:

xcodebuild:  clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode-15_beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.0.99.

CocoaPods Environment

In my .podspec I have defined:

s.platform = :ios, '14.0'
s.ios.deployment_target = '14.0'

@dnkoutso
Copy link
Contributor

This might be fixed by #11828

@adamszeremeta
Copy link
Author

I don't think so, we are using Cocoapods 1.12.1 already

@paulb777
Copy link
Member

There might be a dependency with a low deployment version. Workarounds are to update the dependency's or stay with Xcode 14.2

@Bluelich
Copy link

Bluelich commented Aug 22, 2023

@paulb777 I think the deployment version of PodB should be resolved to 12.0 when I lint the spec of PodA, then the libarclite_*** will not be required by PodB.

# PodA
Pod::Spec.new do |s|
  s.name             = 'PodA'
  s.version          = '0.1.0'
  s.ios.deployment_target = '12.0'
  ......
  s.dependency 'PodB', '0.1.0' 
  ......
end

# PodB
Pod::Spec.new do |s|
  s.name             = 'PodB'
  s.version          = '0.1.0'
  s.ios.deployment_target = '8.0'
  ......
end

@Buju77
Copy link

Buju77 commented Aug 22, 2023

We are facing exactly the same issue with Xcode 14.3.1 already, where the minimum was iOS 11.0+ (instead of iOS 12.0+ here in Xcode 15).

But we are currently unable to update all our external dependencies, because they are one or all of them:

  1. Dependency too old and not maintained anymore. No newer version available, so can't be updated
  2. Newer versions have breaking changes and we currently don't have enough resources to do the refactoring to update the dependencies
  3. They are used in our very old code base where it's easily feasible for us to refactor right now (because touches lots of other code parts)

So we are currently thinking of the following workaround:

  • During linting process, just integrate all the pods into the empty app with minimum deployment target of iOS 12.0 that have lower versions specified in their .podspec
  • Something like changing this line validator.rb#L569 to 13.0 instead of 8.0

Would this work for now as temporary solution?

@Buju77
Copy link

Buju77 commented Aug 23, 2023

Small update:
I just tried my suggested workaround from above and I was able to lint and release our pods again with Xcode 14.3.1 🥳 . So it really worked by raising the default iOS version that Cocoapods would use to iOS 13.0 (instead of 8.0). You can see my small commit in our fork. We use iOS 13.0 is because our code base is already on this version. (yes, we are internally still on CP 1.10.2 state 🙈)

Workaround:
So you can also simply fork Cocoapods yourself and apply the same change in those 2 lines in validator.rb and analyzer.rb to iOS 12.0 for Xcode 15 and use your fork in your Gemfile.

How to verify:
You can verify if your workaround worked by using the pod lib lint ... --no-clean option and then open the generated temporary .xcworkspace and check all the pods targets. They should then all have iOS 12.0 as min. deployment target. And compiling that project should work again.

@alaincaltieri
Copy link

Every year with the new Xcode version we need to workaround this very same issue. Would it be possible to fix it forever within Cocoapods? I believe it is reasonable to specify a deployment version in the Podspec and have that enforced during validation instead of relying on the versions of every single dependency, as long as we comply with their min version of course. Am I wrong on this?

leotm added a commit to MetaMask/metamask-mobile that referenced this issue Sep 4, 2023
leotm added a commit to MetaMask/metamask-mobile that referenced this issue Sep 4, 2023
@singleton-altman
Copy link

@paulb777 I think the deployment version of PodB should be resolved to 12.0 when I lint the spec of PodA, then the libarclite_*** will not be required by PodB.

# PodA
Pod::Spec.new do |s|
  s.name             = 'PodA'
  s.version          = '0.1.0'
  s.ios.deployment_target = '12.0'
  ......
  s.dependency 'PodB', '0.1.0' 
  ......
end

# PodB
Pod::Spec.new do |s|
  s.name             = 'PodB'
  s.version          = '0.1.0'
  s.ios.deployment_target = '8.0'
  ......
end

same issue

@nickx3389
Copy link

I changed all the pod deployment target to 13.0 but when I run pod spec lint I get this:

- NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target '***' from project 'Pods')

This happens for all my pod targets. Can anyone help here?

@kayhanakbay
Copy link

Hi everybody , anyone find solution for the problem ?

@kayhanakbay
Copy link

Hi Everybody ,

Solution for me ;

Clean CocoaPods

rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install

Update pods target version

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
         end
    end
  end
end

@nickx3389
Copy link

It's not working for me @kayhanakbay . IO think the issue lies in the podspec files of the dependencies. I noticed that in one of my dependecies, indeed the ios_deployment_target is 8.0. So, I believe that all pod creators must update their dependencies... Quite difficult...

@saifamer2030
Copy link

any update???

@kayhanakbay
Copy link

@nickx3389 before clean all CocoaPods cache i have same problem and without cleaning i updated min target version all dependencies but not working for me too. Also i have many dependencies which ones default min target is like 8.0 , 12.0 etc and i updated all of them and set min 13.0, right now for me it working.

My app target is "platform :ios, '13.0'" and i make all dependency min target 13.0

@mrsoo
Copy link

mrsoo commented Oct 3, 2023

Ôk

@supervtb
Copy link

Hello, any updates on this topic?
workaround with config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' does not work for me as I use some 3rd party libs which contain another 3rd party under the hood and can not be updated

@stidch
Copy link

stidch commented Oct 26, 2023

Are there any updates? We can still not use Xcode 15 because we can't release our project, because pod lib lint fails with the

SDK does not contain 'libarclite' at the path ...

error.

  1. pod install ☑️
    Consuming dependencies with a lower deployment target than `12.0 is not a problem, since we can workaround the issue by setting

    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']

in our Podfile (see #12033 (comment)).

  1. pod lib lint
    But for the same (the "libarclite") issue when running pod lib lint we don't have a solution yet.

In that case the Xcode Sample Project all the Pods have their original Deployment Target which might be lower than 12.0 and therefor the build resp. the pod lib lint command fails with the SDK does not contain 'libarclite' at the path ... error.

Forking Cocoapods and use a custom version with a "hotfix" as described in #12033 (comment) is not an option for me.

Questions:

  • Is this actually an Xcode or a Cocoapods issue?
  • If it's a Cocoapods issue: are there any plans for a fix?
  • Does anyone knows another workaround than the mentioned above?

Any help is very much appreciated!

@stidch
Copy link

stidch commented Oct 27, 2023

I looks related to #11839

@supervtb
Copy link

@stidch it stopped to work starting from Xcode 14.3 due to min iOS version

@kevenbauke
Copy link

kevenbauke commented Oct 27, 2023

We face a very similar hurdle within fastlane trying to upload our podspec with the pod_push action which runs pod repo push and fails because of the reasons mentioned.

Same issue as with the other devs here: setting the minimum deployment target is not respected. The only workaround is to manually copy the libarclite files into every Xcode version greater than 14.2. We used this article here: Xcode Project Build Error - missing files: libarclite_iphonesimulator.a and had to place all files in the arc folder.

@EltonNushi
Copy link

@nickx3389 before clean all CocoaPods cache i have same problem and without cleaning i updated min target version all dependencies but not working for me too. Also i have many dependencies which ones default min target is like 8.0 , 12.0 etc and i updated all of them and set min 13.0, right now for me it working.

My app target is "platform :ios, '13.0'" and i make all dependency min target 13.0

This worked for me, brilliant! Saved me some time
Thank you!

@rex-remind101
Copy link

Workaround:
So you can also simply fork Cocoapods yourself and apply the same change in those 2 lines in validator.rb and analyzer.rb to iOS 12.0 for Xcode 15 and use your fork in your Gemfile.

Thank you, only thing that worked

@GroovyLLR
Copy link

GroovyLLR commented Dec 1, 2023

For me I was encountering this issue after updating to Xcode 15.

1. local build was failing with error "SDK does not contain 'libarclite' at the path ..."

Solution:

add this to your podfile post installer Note (you can use minimum of iOS 13 it depends on your project)

post_install do |installer|
   installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
         end
    end
  end
end

2. fastlane pod_push was failing with error "SDK does not contain 'libarclite' at the path ..."

Solution:

In your FastFile when you call pod_push include those 2 parameters

skip_import_validation: true,
skip_tests: true,

example:

pod_push(
  use_bundle_exec: true,
  path: "Path to your pod spec",
  repo: repo,
  sources: sources,
  allow_warnings: true,
  verbose: true,
  **skip_import_validation: true,
  skip_tests: true,
)

@stidch
Copy link

stidch commented Dec 1, 2023

For me I was encountering this issue after updating to Xcode 15.

1. local build was failing with error "SDK does not contain 'libarclite' at the path ..."

Solution:

add this to your podfile post installer Note (you can use minimum of iOS 13 it depends on your project)

post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
end
2. fastlane pod_push was failing with error "SDK does not contain 'libarclite' at the path ..."

Solution:

In your FastFile when you call pod_push include those 2 parameters

skip_import_validation: true, skip_tests: true,

example:

pod_push(
  use_bundle_exec: true,
  path: "Path to your pod spec",
  repo: repo,
  sources: sources,
  allow_warnings: true,
  verbose: true,
  **skip_import_validation: true,
  skip_tests: true,
)

@GroovyLLR regarding the "solution of 2."

not really a solution if you ask me, but a not ideal workaround only, since you skip the validation, which is not recommended.

@GroovyLLR
Copy link

GroovyLLR commented Dec 1, 2023

For me I was encountering this issue after updating to Xcode 15.
1. local build was failing with error "SDK does not contain 'libarclite' at the path ..."
Solution:
add this to your podfile post installer Note (you can use minimum of iOS 13 it depends on your project)
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
end
2. fastlane pod_push was failing with error "SDK does not contain 'libarclite' at the path ..."
Solution:
In your FastFile when you call pod_push include those 2 parameters
skip_import_validation: true, skip_tests: true,
example:

pod_push(
  use_bundle_exec: true,
  path: "Path to your pod spec",
  repo: repo,
  sources: sources,
  allow_warnings: true,
  verbose: true,
  **skip_import_validation: true,
  skip_tests: true,
)

@GroovyLLR regarding the "solution of 2."

not really a solution if you ask me, but a not ideal workaround only, since you skip the validation, which is not recommended.

Hello @stidch ,

Yes its not an ideal solution, but upon validation fastlane creates a new App.xcworkspace and imports the pods thereby by-passing the post installer in which we sets the IPHONEOS_DEPLOYMENT_TARGET to 13+, you end up with pods having minimum version less than that and the error happens. From my point of view if your app was build and tested through through previous lanes also considering the fact that it was also properly build without any errors on deploy lane then its ok the by pass validation on pod_push

@songzhiming
Copy link

any update or solution?

@codeHorizonVentures
Copy link

codeHorizonVentures commented Jan 18, 2024

@dnkoutso same issue any update Xcode 15.2 Cocoapods 1.14.3?

clang: error: SDK does not contain 'libarclite' at the path try increasing the minimum deployment target

@supervtb
Copy link

@dnkoutso same issue any update Xcode 15.2 Cocoapods 1.14.3?

clang: error: SDK does not contain 'libarclite' at the path try increasing the minimum deployment target

https://rattle-cornucopia-d72.notion.site/Xcode-Project-Build-Error-missing-files-libarclite_iphonesimulator-a-e56022f7318e4685a8794be79d4bd28a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.