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

need held while installing apollo (version 1.0.3) Via cocoapods ,getting error as follows. #2655

Closed
bhushanrocks412 opened this issue Nov 10, 2022 · 4 comments · Fixed by #2657
Assignees
Labels
dependency-management Issues with CocoaPods, Carthage, or SPM integration question Issues that have a question which should be addressed
Milestone

Comments

@bhushanrocks412
Copy link

Hi i am getting following error in terminal while installing Apollo version '1.0.3' via cocoapods in my ios swift application,
can anyone help me with this. Thanks

pod install
Analyzing dependencies
Downloading dependencies
Installing Apollo (1.0.3)
[!] /bin/bash -c
set -e
make clean build-cli-for-cocoapods
cp .build/release/apollo-ios-cli apollo-ios-cli
chmod +x apollo-ios-cli

swift package clean
swift build --product apollo-ios-cli -c release -Xswiftc -DCOCOAPODS
/Users/bhushandeshmukh/Library/Caches/CocoaPods/Pods/Release/Apollo/1.0.3-936d4: error: package at '/Users/bhushandeshmukh/Library/Caches/CocoaPods/Pods/Release/Apollo/1.0.3-936d4' is using Swift tools version 5.6.0 but the installed version is 5.5.0
make: *** [build-cli-for-cocoapods] Error 1

@bhushanrocks412 bhushanrocks412 added the question Issues that have a question which should be addressed label Nov 10, 2022
@calvincestari
Copy link
Member

calvincestari commented Nov 10, 2022

Hi 👋🏻 - the error itself is quite clear..

error: package at '/Users/bhushandeshmukh/Library/Caches/CocoaPods/Pods/Release/Apollo/1.0.3-936d4' is using Swift tools version 5.6.0 but the installed version is 5.5.0

You need to use a minimum Swift version of 5.6. This ships with Xcode and therefore you need to use a minimum Xcode version of 13.3. You can see the version of Swift shipped with each Xcode version from here.

The error is being thrown because the make command builds the CLI which is a Swift package and in the Package.swift file you can see that the swift-tools-version required is 5.6.

@bhushanrocks412 - is there a reason you wouldn't be able to upgrade your version of Xcode?

Update - More context here, Swift 5.6 is needed for the SPM plugins.

@calvincestari
Copy link
Member

I see that the podspec spec does allow for specifying a minimum Swift version using swift_versions, I think we should consider adding this to our podspec to avoid this kind of mismatch in the future.

@calvincestari calvincestari self-assigned this Nov 10, 2022
@calvincestari calvincestari added this to the Release 1.0.4 milestone Nov 10, 2022
@calvincestari calvincestari added dependency-management Issues with CocoaPods, Carthage, or SPM integration question Issues that have a question which should be addressed and removed question Issues that have a question which should be addressed labels Nov 10, 2022
@calvincestari
Copy link
Member

Turns out we already use swift_version in the podspec, but it is out of date. We'll get that fixed.

@bhushanrocks412
Copy link
Author

Thanks @calvincestari & @AnthonyMDev ... after upgrading Xcode to latest version, issue is now resolved. appreciate your response. there was no reason to not upgrade to latest Xcode version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency-management Issues with CocoaPods, Carthage, or SPM integration question Issues that have a question which should be addressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants