我正在尝试使用 CocoaPods 安装 Realm。我以前做过没有问题,但现在我遇到了错误。下面我发布了我的 Podfile 代码和我在终端中返回的错误
播客文件
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
Uncomment this line if you're using Swift
use_frameworks!
target 'Htlaeh' do
pod 'RealmSwift'
end
target 'HtlaehTests' do
'pod RealmSwift'
end
target 'HtlaehUITests' do
pod 'RealmSwift'
end
错误
[!] Invalid `Podfile` file: syntax error, unexpected tCONSTANT, expecting end-of-input
target 'Htlaeh' do
^. Updating CocoaPods might fix the issue.
# from /Users/Cody/Desktop/Htlaeh/Podfile:7
# -------------------------------------------
#
> target 'Htlaeh' do
#
# -------------------------------------------
最佳答案
我想我可以看到 CocoaPods 不满意的两个潜在语法错误:
Uncomment this line if you're using Swift
需要被注释掉(它指的是它下面的行。;))在
Tests
目标中,它应该是pod 'RealmSwift'
。撇号现在在 'pod' 前面。
请尝试更正这两个语法问题,如果不能解决问题,请告诉我。 :)
关于ios - CocoaPods 与 Realm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33165615/