Apollo-ios: Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.0 compiler

Created on 25 Mar 2019  ·  10Comments  ·  Source: apollographql/apollo-ios

Please add support for Swift 5 with Xcode 10.2 :)

Most helpful comment

Hey I found an workaround, if you use Cocoa pods try this.
The current master branch has fix, but is not released. See also the current commit

https://github.com/apollographql/apollo-ios/pull/427/commits/40b8186af68a6dccf108ef98c9d82b1a8f204a63

pod 'Apollo', :inhibit_warnings => true, :git => 'https://github.com/apollographql/apollo-ios.git', :branch => 'master'

All 10 comments

Got the same problem..

Hey I found an workaround, if you use Cocoa pods try this.
The current master branch has fix, but is not released. See also the current commit

https://github.com/apollographql/apollo-ios/pull/427/commits/40b8186af68a6dccf108ef98c9d82b1a8f204a63

pod 'Apollo', :inhibit_warnings => true, :git => 'https://github.com/apollographql/apollo-ios.git', :branch => 'master'

Thanks, will update my pod.

@aBuder , I cannot use pod 'Apollo', :inhibit_warnings => true, :git => 'https://github.com/apollographql/apollo-ios.git', :branch => 'master' because of using Apollo in custom module with Cocoapods. There is no way to add git path dependency to podspec.

it seems still error after execute script.
Apollo.framework/check-and-run-apollo-cli.sh: line 71: npm: command not found

427 seems to have fixed this on 30th Jan but no tagged release has occurred since then so will have to point to master in podfile until then.

Is there any known workaround for those of us using Carthage? Just upgraded Xcode on total autopilot 🤦🏻‍♂️

@SRozhina You can work with custom modules using the s.dependecy 'Apollo' on .podspec and overriding Apollo framework on the app podfile:

  # Internal Libraries
  pod 'ProjectCore', path: '../project-ios-sdk'

  # Network
  pod 'Apollo', :inhibit_warnings => true, :git => 'https://github.com/apollographql/apollo-ios.git', :branch => 'master'

OK, well... it took me WAY too long to figure this out, but I ended up simply going into the Carthage/Checkouts/apollo-ios directory, pulling, and building. I ended up using #475 instead of master.

Also make a note NOT to run carthage update, as it will upgrade to an incompatible version of Starscream and you'll chase your tail for a bit trying to get the build to work.

This should be fixed in 0.10.0.

Was this page helpful?
0 / 5 - 0 ratings