如何使用cocoapods安装Facebook的SDK的iOS?
在Facebook的文档:这里: https : //developers.facebook.com/docs/ios/getting-started
这是写我们可以使用:
pod \'Facebook-iOS-SDK\'
在我们的项目中安装pod。 但是我将它添加到第10行的pod文件中,并尝试运行pod install,它在terminal上显示以下错误:
[!] Oh no, an error occurred. It appears to have originated from your Podfile at line 10. Search for existing github issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A10%3A+syntax+error%2C+unexpected+%24undefined%0A++++pod+%5C%27%2FUsers%2Fprajeetshrestha%2FDeskt...%0A+++++++++%5E%0A%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A13%3A+syntax+error%2C+unexpected+tCONSTANT%2C+expecting+keyword_end%0Atarget+%27HotRentsTests%27+do%0A+++++++++++++++++++++%5E%0A%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A13%3A+unterminated+string+meets+end+of+file%0A%2FUsers%2Fprajeetshrestha%2FDesktop%2FHotRents%2FPodfile%3A13%3A+syntax+error%2C+unexpected+end-of-input%2C+expecting+keyword_end&type=Issues If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new
Facebook-iOS-SDK
已被弃用(请参阅使用pod install
时提供给您的消息cocoapods)。
根据Facebook你应该使用:
pod "FBSDKCoreKit"; pod "FBSDKLoginKit"; pod "FBSDKShareKit"; pod "FBSDKMessengerShareKit";
将Pod连接更改为
pod "Facebook-iOS-SDK"
解决了这个问题,为什么他们把文档当成问题呢?
编辑 :这个答案现在是过时的 。 安装facebook Pod的正确方法是如上所述的@aramusss。
- Google Analytics Pod会安装太多的依赖项
- 为什么我喜欢SnapKit,您也可以
- 在Xcode中的豆荚错误“Id:framework not found Pods”
- 依赖于其他Pod的分布式框架
- AFNetworking不会编译
- 使用CoreData创建待办事项列表应用程序的简便方法
- Integrasi Firebase dengan iOS Swift melalui Cocoapods依赖项
- iOSアプリの启动速度を2倍にするために,复数のDynamic FrameworkをStaticひ,ひとつのDynamic Frameworkを作るwith Swift
- 在Xcode 7上发生错误“pod install”