網頁

2020年3月15日 星期日

Xcode 10.1編譯舊專案出現了'sqlite3_key' is invalid in C99的Error

依然是舊專案的問題,出現了'sqlite3_key' is invalid in C99的Error,查了下看到這篇sqlite3_key is invalid in C99 iOS11,看起來在iOS10是正常的,仔細想了下猜測是compiler版本問題,我的Xcode是10.1,就回到Xcode -> Preferences,點擊Locations,找到Command Line Tools,選Xcode 8.3.1,重開再compiler就OK了

參考網址:
sqlite3_key is invalid in C99 iOS11

升級到Xcode 9.3後出現Expected method to read dictionary element not found on object of type 'id'

開啟多年未開的專案想要compile時一直出現Expected method to read dictionary element not found on object of type 'id<NSFastEnumeration,NSObject>'的錯誤訊息,仔細查看,是PromiseKit這個library在xcode 9.3後會有的問題,查半天都是講用cocoapods升級PromiseKit到1.7.2就OK了,打下pod update後,又出現其他專案的Error,仔細一看發現一個根本不能update的Library,問題最後只能是直接解決這error,反過來想,只好去查看這Framework針對這issue的commit,最後找到Fix build on Xcode 9.3,修改如下



有種怎沒想到這樣改的蠢想法,不過又有種這像是workaround的感覺!!

參考網址:
Objective C- Xcode 9.3 - Expected method to read dictionary element not found on object of type
Fix build on Xcode 9.3