您好,登錄后才能下訂單哦!
在使用Parse的一些相關服務時候,需要下載Parse的SDK,除了需要添加相應的系統框架和庫的支持
AudioToolbox.framework
CFNetwork.framework
CoreGraphics.framework
CoreLocation.framework
libz.1.1.3.dylib
MobileCoreServices.framework
QuartzCore.framework
Security.framework
StoreKit.framework
SystemConfiguration.framework
假如你更改導入其他靜態庫時設置了,Linking下面的Other Linker Flags(比如:我在使用芒果廣告平臺,配置芒果平臺的靜態庫:點擊程序Target文件,選擇Build Settings標簽頁,找到Linking下面的Other Linker Flags,添加參 數-all_load -ObjC。)但是這和Parse靜態庫設置沖突需要以移除 -ObjC,否則導致如下錯誤
Undefined symbols for architecture i386: "_FBTokenInformationExpirationDateKey", referenced from: -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o) "_FBTokenInformationTokenKey", referenced from: -[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o) "_FBTokenInformationUserFBIDKey", referenced from: -[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o) "_OBJC_CLASS_$_FBRequest", referenced from: objc-class-ref in Parse(PFFacebookAuthenticationProvider.o) "_OBJC_CLASS_$_FBSession", referenced from: objc-class-ref in Parse(PFFacebookAuthenticationProvider.o) "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from: _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o) "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from: _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
解決辦法一:網上下載FaceBookSDK.framework,加入里面即可解決這些錯誤(文件比較大)
解決方法二:設置單獨的靜態庫,使用-force_load /path/libname.a 來代替之前需要配置 -all_load _ObjC (比如下圖:)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。