davidmartos96 / sqflite_sqlcipher

SQLite flutter plugin
BSD 2-Clause "Simplified" License
99 stars 44 forks source link

Error in pod install in iOS #51

Closed amani-mohammad closed 2 years ago

amani-mohammad commented 2 years ago

I have added sqflite_sqlcipher: ^2.1.0 to the pubspec.yaml file in my Flutter code. But each time I try to run pod install I get this error:

[!] /bin/bash -c 
set -e
./configure --enable-tempstore=yes --with-crypto-lib=commoncrypto CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_STAT3 -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_LOAD_EXTENSION -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DHAVE_USLEEP=1 -DSQLITE_MAX_VARIABLE_NUMBER=99999"; make sqlite3.c
checking build system type... x86_64-apple-darwin20.6.0
checking host system type... x86_64-apple-darwin20.6.0
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/.../Library/Caches/CocoaPods/Pods/Release/SQLCipher/4.4.2-1ab0b':
configure: error: C compiler cannot create executables
See `config.log' for more details

I installed sqlcipher on my Mac but still get this error!

Any help?

davidmartos96 commented 2 years ago

Not sure what that could be. The 2.1.0 update does not interact at all with ios. Have you tried running flutter clean first? Also, maybe the config.log file has some more information

amani-mohammad commented 2 years ago

Not sure what that could be. The 2.1.0 update does not interact at all with ios. Have you tried running flutter clean first? Also, maybe the config.log file has some more information

I tried to run flutter clean and it still gives me the same error! Where can I find the config.log file? I searched for it and can't find it.

davidmartos96 commented 2 years ago

@amani-mohammad Did you update XCode recently? Maybe you didn’t install again the XCode command line tools? Also, have you tried using the previous version of the package? sqflite_sqlcipher: 2.0.0 # Without the hat symbol If the previous version doesn't work, it's probably something on your end

amani-mohammad commented 2 years ago

@davidmartos96 Thanks David for mentioning the Xcode command line tools, this is the problem actually. It wasn't set in the new Xcode I installed recently and after selecting it it works now!! Thank you so much :) :+1:

davidmartos96 commented 2 years ago

@davidmartos96 Thanks David for mentioning the Xcode command line tools, this is the problem actually. It wasn't set in the new Xcode I installed recently and after selecting it it works now!! Thank you so much :) :+1:

Great to hear!