1.數(shù)據(jù)庫(kù)加密之Xcode9.0后,sqlcipher加密:Implicit declaration of function ’sqlite3_key‘is invalid in C99問(wèn)題
解決辦法
修改鏈接路徑绊诲,使其引用自正確的文件
既然是鏈接文件出錯(cuò)送粱,那么我們通過(guò)修改#import < sqlite3.h > 改為#import < SQLCipher/sqlite3.h > ,讓其鏈接到sqlcipher下的sqlite3.h文件驯镊,可以解決這個(gè)問(wèn)題
注意葫督,如果像我們上一篇文章竭鞍,是通過(guò)靜態(tài)庫(kù)來(lái)配置SQLCipher,是找不到< SQLCipher/sqlite3.h>路徑的橄镜,我們可以通過(guò)強(qiáng)制打破隱式聲明的方式解決這個(gè)問(wèn)題偎快,在FMDatabase.m中聲明sqlite3_key和sqlite3_rekey:
#if defined(SQLITE_HAS_CODEC)
SQLITE_API int sqlite3_key(sqlite3 *db, const void *pKey, int nKey);
SQLITE_API int sqlite3_rekey(sqlite3 *db, const void *pKey, int nKey);
#endif
2.charles開啟Charles-Proxy-macOS Proxy 時(shí)報(bào)錯(cuò)
Charles cannot configure your proxy settings while it is on a read-only volume. Perhaps you are running Charles from the disk image? If so, please copy Charles to the Applications folder and run it again. Otherwise please ensure that Charles is writable by the current user and try again.
解決:
終端輸入后重啟
sudo chown -R root "/Applications/Charles.app/Contents/Resources"
sudo chmod -R u+s "/Applications/Charles.app/Contents/Resources"