如何使用cocoapods为iOS安装facebook sdk? [英] How to install facebook sdk for iOS using cocoapods?
本文介绍了如何使用cocoapods为iOS安装facebook sdk?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在facebook的文档中:
这里: https://developers.facebook.com/docs/ ios / get-started
In the facebook's documentation: Here: https://developers.facebook.com/docs/ios/getting-started
我们可以使用:
pod \'Facebook-iOS-SDK\'
用于安装pods我们的项目。但是我在第10行的pod文件中添加了它并尝试运行pod install,它在终端上显示以下错误:
For installing pods in our project. But I added it in the pod file at line 10 and try to run pod install, it shows following error on 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
推荐答案
将pod链接更改为
pod "Facebook-iOS-SDK"
解决了为什么他们在文档中放置\'是现在的问题?
solved it why do they put \' in documentation is the question now?
编辑:此答案现已过时。安装Facebook Pod的正确方法是如上所述的@aramusss。
EDIT: This answer is now outdated. The correct way to install facebook Pod is as @aramusss described above.
这篇关于如何使用cocoapods为iOS安装facebook sdk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文