iOS 프로젝트의 FMDB+SQLCipher에 오류가 발생했습니다. 머리가 타서 피곤한 노트입니다.
시작하다
젠킨스로 돌리면 틀려!
GUI의 Xcode는 문제없어, 이게 뭐야!
ld: warning: ignoring file /Users/192agur2/.jenkins/jobs/test/workspace/src/build/libsqlcipher.a, file was built for archive which is not the architecture being linked (armv7): /Users/192agur2/.jenkins/jobs/test/workspace/src/build/libsqlcipher.a
Undefined symbols for architecture armv7:
"_sqlite3_user_data", referenced from:
_FMDBBlockSQLiteCallBackFunction in FMDatabase.o
"_sqlite3_exec", referenced from:
-[FMDatabase executeStatements:withResultBlock:] in FMDatabase.o
"_sqlite3_bind_blob", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_free", referenced from:
-[FMDatabase executeStatements:withResultBlock:] in FMDatabase.o
"_sqlite3_bind_int64", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_bind_double", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_bind_text", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_reset", referenced from:
-[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
-[FMStatement reset] in FMDatabase.o
"_sqlite3_changes", referenced from:
-[FMDatabase changes] in FMDatabase.o
"_sqlite3_create_function", referenced from:
-[FMDatabase makeFunctionNamed:maximumArguments:withBlock:] in FMDatabase.o
"_sqlite3_key", referenced from:
-[FMDatabase setKeyWithData:] in FMDatabase.o
"_sqlite3_rekey", referenced from:
-[FMDatabase rekeyWithData:] in FMDatabase.o
"_sqlite3_busy_handler", referenced from:
-[FMDatabase setMaxBusyRetryTimeInterval:] in FMDatabase.o
"_sqlite3_column_int64", referenced from:
-[FMResultSet longForColumnIndex:] in FMResultSet.o
-[FMResultSet longLongIntForColumnIndex:] in FMResultSet.o
"_sqlite3_next_stmt", referenced from:
-[FMDatabase close] in FMDatabase.o
"_sqlite3_open_v2", referenced from:
-[FMDatabase openWithFlags:vfs:] in FMDatabase.o
"_sqlite3_last_insert_rowid", referenced from:
-[FMDatabase lastInsertRowId] in FMDatabase.o
"_sqlite3_open", referenced from:
-[FMDatabase open] in FMDatabase.o
"_sqlite3_bind_null", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_threadsafe", referenced from:
-[FMDatabase initWithPath:] in FMDatabase.o
+[FMDatabase isSQLiteThreadSafe] in FMDatabase.o
"_sqlite3_bind_parameter_index", referenced from:
-[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
-[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
"_sqlite3_column_bytes", referenced from:
-[FMResultSet dataForColumnIndex:] in FMResultSet.o
-[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
"_sqlite3_sleep", referenced from:
_FMDBDatabaseBusyHandler in FMDatabase.o
"_sqlite3_column_double", referenced from:
-[FMResultSet doubleForColumnIndex:] in FMResultSet.o
"_sqlite3_data_count", referenced from:
-[FMResultSet resultDict] in FMResultSet.o
-[FMResultSet resultDictionary] in FMResultSet.o
"_sqlite3_column_blob", referenced from:
-[FMResultSet dataForColumnIndex:] in FMResultSet.o
-[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
"_sqlite3_bind_int", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_column_name", referenced from:
-[FMResultSet columnNameToIndexMap] in FMResultSet.o
-[FMResultSet kvcMagic:] in FMResultSet.o
-[FMResultSet resultDictionary] in FMResultSet.o
-[FMResultSet columnNameForIndex:] in FMResultSet.o
armv7 이외에arm7과arm64도 같은 오류가 발생했고 머리도 고장났다.Framework를 추가하거나 당겼지만 효과가 없는 것 같은데...
그리고 최선을 다해서 해결책이 나와도 전혀 효과가 없어...
끝내다
프로젝트 중 SQLCipher의 "TARGETS"> "sqlcipher"> "구축 설정"> "Architectures"> "Supported Platforms"지정을 "iOS"로 변경한 후 해결합니다.또한 [PRODDJECT]도 같은 설정을 했습니다.
감상 최초 [Supported Platforms]의 지정은 [iphoneos macos iphonesimurator]와 같다. 뭐가 달라요? Xcodebuild는 정교합니다.엄하다 FMDB는 나쁜 아이가 아닙니다. iOS 너무 많이 맞지 마세요.
Reference
이 문제에 관하여(iOS 프로젝트의 FMDB+SQLCipher에 오류가 발생했습니다. 머리가 타서 피곤한 노트입니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/192agur2/items/d88e872a14ddc700b577텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)