facebook - Module compiled with Swift 2.3 cannot be imported in Swift 3.0 - TagMerge
4Module compiled with Swift 2.3 cannot be imported in Swift 3.0Module compiled with Swift 2.3 cannot be imported in Swift 3.0

Module compiled with Swift 2.3 cannot be imported in Swift 3.0

Asked 10 months ago
11
4 answers

Remember to set Use Legacy Swift Language Version to YES for your project target

You are building your project in 2.3 and not in 3.0

Source: link

2

Have in mind that if you want to use Swift 3 as your main project's language you have to use pods that are either Swift 3, or Swift 2.2-. If you try to use a Swift 2.3 project, they will not compile (as in the error you describe).

So the best thing to do is to use either Swift 3 pods, or Swift 2 (2.1 or 2.2) pods and select Use Legacy SLV for that specific pod (in 'Pods' build setting for the specific target you want to use).

Source: link

0

Currently the Facebook SDK does not yet support projects written in Swift 3.0.

There are a couple of issues you can subscribe to on their Github for updates.

You'll have to use Swift 2.3 for now. Facebook said it was planning to release an update soon after the GM was released, which has already happened, so it will probably come within the next few weeks.

Source: link

0

For example, if I need to switch to the beta version of Xcode:
sudo xcode-select -s /Applications/Xcode.app
carthage update
PHONY: xcode xcode-beta xcode: sudo xcode-select -s /Applications/Xcode.app carthage update --platform ios xcode-beta: sudo xcode-select -s /Applications/Xcode-beta.app carthage update --platform ios
123456789PHONY: xcode xcode-beta xcode:        sudo xcode-select -s /Applications/Xcode.app        carthage update --platform ios xcode-beta:        sudo xcode-select -s /Applications/Xcode-beta.app        carthage update --platform ios

Source: link

Recent Questions on facebook

    Programming Languages