简体   繁体   中英

Include of Non Modular Header and file not found for sqlite3.h in Swift with AWS SDK

I'm caught between two very peculiar errors in an iOS Swift project. When I attempt to compile my project, I receive a "Include of Non-modular header" error due to several files in the AWSCore framework of the AWS iOS SDK requiring "sqlite3.h" as an import.

After spending several hours looking for solutions, I eventually copied a copy of the file into the AWSCore folder in my project from Cocoapods, and this removes the issue, compiling my project successfully. However, when I clean the build and attempt to rebuild, I receive a "Lexical or Preprocessor issue - file not found" due to the extra SQLite3.h file.

When I remove it, the compile process will go up to the "include of Non-modular header" error again.

I have already tried nearly all of the common solutions - set include of modular headers to yes, removing the framework and readding, adding "." to the header/framework search paths recursively. I'm now completely stumped, so any help would be greatly appreciated. Thanks!

could you provide more details about this problem? "several files in the AWSCore framework of the AWS iOS SDK requiring "sqlite3.h" as an import." could you provide a list of files that causes the error? May I know what version of AWS Mobile SDK are you using? Did you installed it by using Cocoapods or downloaded from Amazon Website?

Have you tried changing the build setting CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES or 'Allow Non-module includes In Framework Modules' to Yes? Just search 'module' in the Frameworks Build Settings to find it. You may need to clean the build first before change this setting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM