我正在尝试使用CocoaPods安装Realm。我以前做过,没问题,但是现在出现错误。下面我发布了我的Podfile代码以及我在终端中返回的错误
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/