New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build on Xcode 9.0 #591
Comments
This issue can be resolved by modifying the import statement for sqlite3.h in the FMDatabase.m at line 8 from the following |
@andrewcl change |
If you are using a static library for SQLCipher, there will be no
Or you can use this fork temporarily until the issue is fixed:
|
These problems sound a lot like what is described in this advisory on using SQLCipher in Xcode 9: https://discuss.zetetic.net/t/important-advisory-sqlcipher-with-xcode-9-and-new-sdks/ It may be the case that by following the guidance there no adjustment to FMDB is necessary (e.g. |
I don't think adding specific ifdefs to FMDB for SQLCipher is a good idea. You can define SQLITE_HAS_CODEC, and the sqlite headers will have sqlite3_key and sqlite3_rekey enabled. |
We already have |
Hi @robertmryan The error likely has nothing to do with SQLITE_HAS_CODEC. Rather, when use_frameworks! is enabled it Cocoapods is not properly creating header links under Pods/Headers. This prevents Xcode from referencing the proper sqlite3.h file. You can verify this behavior by examining the Pods directory after installation. The advisory that @billymeltdown linked has a workaround using a post_install hook to correctly link the headers. We are open to other ideas/solutions. Ultimately if the right header can be found by Xcode everything works just fine, so this isn't really a problem with SQLCipher per se. Let us know what you think. |
@sjlombardo - Yep, I wasn’t clear. That was my point, namely, as I read that advisory, |
@billymeltdown thanks for the input, we tried the post install hook but the problem is that we can't deploy new versions of our library (which depends on FMDB and SQLCipher) using When we run
I also tried using To me the symlink "fix" seems like a bit of a hack but at the moment I'd accept any decent solution which allows us to publish a new spec. |
Hi @tomblench thanks for the clarification, that is definitely unfortunate and problematic. Have you considered raising an issue to the Cocoapods team? There was a previous issue raised about this behavior before which garnered many comments, but was ultimately auto-closed without an update (CocoaPods/CocoaPods#4605). I just can't think of any way that we could "fix" this in the SQLCipher pod itself. The header is being properly generated and packaged, it's just not placed where Xcode can find it by Cocoapods. |
@sjlombardo thanks for your input, I have raised CocoaPods/CocoaPods#7232 which shows a minimal podspec demonstrating the issue. |
Hi !
I can't build FMDB with this pod file line :
pod 'FMDB/SQLCipher' with FMDB v. 2.7.2 & SQLCipher v. 3.4.1
The error I get in class FMDatabase.m is :
I waited for new version (I was in v. 2.6) and still have the same problem.
FYI, it works with Xcode 8.3.3.
Thanks
The text was updated successfully, but these errors were encountered: