函数'FBSDK_NOT_DESIGNATED_INITIALIZER'的隐式声明在C99 Expected')'中无效
我正在使用适用于iOS 4.6.0的Facebook SDK,而今天在将cocoapods更新为0.38.2后遇到上述错误。我不确定这个错误与cocoapods有什么关系。
I'm using Facebook SDK for iOS 4.6.0 and just today above error encountered after updating cocoapods to 0.38.2. I'm not sure this error has anything to do with cocoapods.
错误截图:
Error screenshot:
我遇到了同样的问题。出现问题的原因是,我连接了 ParseFacebookUtils (正在加载 Facebook-iOS-SDK (这是已弃用的版本)和 FBSDKCoreKit 分开。
I had the same issue. The problem appeared because, I was connecting both "ParseFacebookUtils" (which was loading "Facebook-iOS-SDK" (which is the deprecated version) and "FBSDKCoreKit" separately.
Facebook-iOS-SDK 和 FBSDKCoreKit 都有 FBSDKMacros.h 具有不同的声明 FBSDK_NOT_DESIGNATED_INITIALIZER ,这就是XCode中的消息出现的原因。
"Facebook-iOS-SDK" and "FBSDKCoreKit" both have "FBSDKMacros.h" which has different declarations of "FBSDK_NOT_DESIGNATED_INITIALIZER" and that is why message in XCode appear.
我建议,如果 ParseFacebookUtils 不在您的podfile列表中,请检查哪个cocoaPod加载 Facebook-iOS-SDK 并尝试使用更新版本的更新版本那个框架。
What I suggest, if "ParseFacebookUtils" is not in your podfile list, check which cocoaPod loading "Facebook-iOS-SDK" and try to update it with the newer version of that framework.
如果你的情况是 ParseFacebookUtils 而不是轻易地将其更改为' ParseFacebookUtilsV4 '
If "ParseFacebookUtils" is your case than easily change it to 'ParseFacebookUtilsV4'
当然不要忘记运行' pod update '以激活所有更改
And surely don't forget to run 'pod update' to make all changes active
希望这会有所帮助。