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

Pod install fails for versions after 1.0.3 due to VersionChecker.swift #2688

Closed
yiyingzz opened this issue Nov 22, 2022 · 2 comments · Fixed by #2695
Closed

Pod install fails for versions after 1.0.3 due to VersionChecker.swift #2688

yiyingzz opened this issue Nov 22, 2022 · 2 comments · Fixed by #2695
Assignees

Comments

@yiyingzz
Copy link

Bug report

Installing Apollo via Cocoapods for versions after 1.0.4+ fails due to an issue with a file VersionChecker.swift. I checked the commits and it looks like this file was added 8 days ago before v1.0.4 was released. Installing a previous ver worked fine.

This is the error message:

/Users/y/Library/Caches/CocoaPods/Pods/Release/Apollo/1.0.4-7c977/Sources/CodegenCLI/Extensions/VersionChecker.swift:34:29: error: variable binding in a condition requires an initializer
      if let projectRootURL {
                            ^
/Users/y/Library/Caches/CocoaPods/Pods/Release/Apollo/1.0.4-7c977/Sources/CodegenCLI/Extensions/VersionChecker.swift:52:29: error: variable binding in a condition requires an initializer
      if let projectRootURL {
                            ^
make: *** [build-cli-for-cocoapods] Error 1

Versions

Please fill in the versions you're currently using:

  • apollo-ios SDK version: 1.0.4+
  • Xcode version: 13.4
  • Swift version: 5.6
  • Package manager: Cocoapods

Steps to reproduce

Install Apollo 1.0.4 or 1.0.5 using Cocoapods

@calvincestari
Copy link
Member

Hi @yiyingzz - if let projectRootURL { is the new if let shorthand from SE-0435. From that proposal you can see that it was implemented in Swift 5.7, which is available in Xcode 14.0/14.1. If you update your version of Xcode the compiler error will go away.

Is there a specific reason you won't be able to update Xcode?

@yiyingzz
Copy link
Author

Hi @calvincestari - thanks for the quick response! I will have to check with our team if we can update it as we were on 13.x due to some build issues.

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.

2 participants