There is an error after I update SQLite.swift today, how to fix that? Thank you!
Installing SQLite.swift 1.0.0.pre (was 0.1.0.pre)
/*/Pods/SQLite.swift/Source/Core/SQLite-Bridging.h:28:9: Include of non-modular header inside framework module 'SQLite.SQLite_Bridging'
Could not build Objective-C module 'SQLite'
What's your Podfile look like? Are you on the swift-2 branch?
@stephencelis Thanks for your response, my Podfile looks like this:
platform :ios, '8.0'
use_frameworks!
pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git', branch: 'swift-2'
I switch my project to swift-2 last Friday, there is no problem that time, but it's not fine after I use pod update, finally I delete these lines:
And it is okay now. But this is not a good way, right? There maybe something wrong with me, please tell me, thank you!
Definitely not. I'll take a look at this tonight to see if I can repro. Thanks!
I am also experiencing this issue. Any help is appreciated, thanks!
I am also experiencing the same issue
Could not build Objective-C module 'SQLite'
Same for me
I'm having the same issue and was able to fix it the same way.
I noticed there are almost the same 3 lines in the 2 files SQLite-Bridging.h and SQLite-Bridging.m.
But in the .h file, it is
#ifndef COCOAPODS
#import "sqlite3.h"
#endif
whereas in the .m file it is
#import "SQLite-Bridging.h"
#ifdef COCOAPODS
#import "sqlite3.h"
#endif
Notice the .m file imports the .h file, and there is a difference between the #ifdef and #ifndef.
Adding this to my Podfile solved the problem for me:
post_install do |installer|
installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
end
Pretty sure this is fixed now as part of the pending PR #314, and possibly in the main branch already. Closing this and keeping #230 open as a placeholder for CocoaPod build problems until/if that PR is accepted.
I still have this issue today after using cocoapod.
I have to delete 3 lines like @little2s .
The way of @hiltonc doesn't help.
Same for me
in SQLite.h i change the code like this #import "SQLite-Bridging.h"
work for me
cocoapod 1.0.1 xcode 7.3.1 swift 2.2
Hello @stephencelis.
I have the same issue on Xcode 8.3.1 and swift 3. No one solution doesn't work for me. How can I fix it?
In podfile I have the next line pod 'SQLite.swift', '~> 0.11.4'
@stephencelis I am trying to migrate my project to swift 3 in xcode 8.3. I am getting this error and none of the suggested solutions seem to work. Any update on it?
@sashwini I also had the same problem until I saw the next line in 'Installation' block of SQLite.swift:
Note: SQLite.swift requires Swift 4 (and Xcode 9).
So, all you need is to migrate to Swift 4 and Xcode 9 and everything will work fine
Most helpful comment
Hello @stephencelis.
I have the same issue on Xcode 8.3.1 and swift 3. No one solution doesn't work for me. How can I fix it?
In podfile I have the next line
pod 'SQLite.swift', '~> 0.11.4'