0

I'm migrating my iOS application to Xcode8 and Swift 3. I updated the dependencies version, everythings looks fine except for the SQLite.swift. In my project on the line "import SQLite" I've this error:

"Module compiled with Swift 2.3 cannot be imported in Swift 3.0 ..."

while I'm targeting the latest version of SQLite.swift. I also set "Use Legacy Swift Language Version" to yes for the Target "SQlite.swift" under the Pods project. Any idea what I'm missing ?

My pod file looks like this:

platform :ios, '8.0'
use_frameworks!

target 'XYZ' do
    pod 'OAuthSwift', '~> 1.0.0'
    pod 'SwiftyJSON', '~> 3.1.1'
    pod 'SQLite.swift', '~> 0.10.1'
    pod 'Fabric', '~> 1.6.9'
    pod 'Crashlytics', '~> 3.8.2'
    pod 'PagingMenuController', '~> 1.4.0' #2.0.0 require iOS9+
    pod 'SDWebImage/WebP', '~> 4.0.0-beta2'
    pod 'ReachabilitySwift', '~> 3'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end
Philiz
  • 429
  • 5
  • 25

2 Answers2

0

I think 0.10 doesn't support swift 3.

Try using the following line in Podfile

pod 'SQLite.swift', :git => 'https://github.com/stephencelis/SQLite.swift.git', :branch => 'master'
Rahul Katariya
  • 3,528
  • 3
  • 19
  • 24
  • Yes you are right! Thanks. Very confusing as the version displayed on their page has not been updated. – Philiz Oct 13 '16 at 15:00
0

use this.definatly work i use this and for me 100% work

use_frameworks!

target 'YourAppTargetName' do
    pod 'SQLite.swift', '~> 0.11.3'
end
ronak patel
  • 400
  • 5
  • 17