安装 Firebase pod 后出现链接器错误
Linker error after installing Firebase pod
我是 iOS 应用程序开发的初学者。我目前正在做一个需要从 Parse 更改为 Firebase 的项目。
- 我按照
firebase
站点指示安装了 cocoa pods 和“firebase/core
” pod
。
- 在 appdelegate.h
中导入 firebase.h
- 在“
didfinishlaunchingwithoptions
”中添加了 [FIRApp configure];
- 在项目中添加了“
googleservice-info.plist
”。
完成这些步骤后,我 运行 构建但失败并出现以下错误 (Screen Shot)
显示最近的问题
Ld /Users/../Build/Products/Debug-iphonesimulator/Example.app/Example
Apple Mach-O 链接器错误组
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我知道这与我项目中的解析代码有关,但我对 Parse 或 Firebase 了解不多。
请帮我解决这个错误,并指导我如何成功地从 Parse 迁移到 Firebase。
如果您使用了 Parse SDK,请确保从您的项目中删除 ParseFacebookUtils.framework
库或从您的 podfile
中删除
pod 'Parse'
pod 'ParseFacebookUtilsV4'
我是 iOS 应用程序开发的初学者。我目前正在做一个需要从 Parse 更改为 Firebase 的项目。
- 我按照
firebase
站点指示安装了 cocoa pods 和“firebase/core
”pod
。 - 在 appdelegate.h 中导入 firebase.h
- 在“
didfinishlaunchingwithoptions
”中添加了[FIRApp configure];
- 在项目中添加了“
googleservice-info.plist
”。
完成这些步骤后,我 运行 构建但失败并出现以下错误 (Screen Shot)
显示最近的问题
Ld /Users/../Build/Products/Debug-iphonesimulator/Example.app/Example
Apple Mach-O 链接器错误组
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我知道这与我项目中的解析代码有关,但我对 Parse 或 Firebase 了解不多。
请帮我解决这个错误,并指导我如何成功地从 Parse 迁移到 Firebase。
如果您使用了 Parse SDK,请确保从您的项目中删除 ParseFacebookUtils.framework
库或从您的 podfile
中删除
pod 'Parse'
pod 'ParseFacebookUtilsV4'