0

I'm getting the following error when importing EventKit in Swift 3 with Xcode 8.2.1:

Error: module compiled with Swift 2.3 cannot be imported in Swift 3.0.2:
/Users/Jack/Library/Developer/Xcode/DerivedData/AddressBook-bnegvaeqmzvjynatbktoiyfopirj/Build/Products/Debug-iphoneos/AddressBook.swiftmodule/arm64.swiftmodule

Seems odd that EventKit is causing this, couldn't find anything on SO about it. Is this likely to be caused by something else, and regardless how should I go about trying to fix it?

1 Answers1

0

You should change Swift Compiler - Version from the app settings. Use Legacy Swift Language Version, set this property to NO.

  • but how will it resolve the issue as by switching off the legacy swift language support, you cannot use the module compile with Swift 2.3? – ldindu Feb 26 '17 at 14:36
  • I've toggled with the Legacy swift version already - it is set to NO and my app is Swift 3 through and through. Did toy with using Swift 2.3 but seems wasteful and illogical to downgrade my codebase in order to use EventKit, for a problem that no one else seems to be having. – user3526037 Feb 27 '17 at 06:49