CocoaPods 与 Realm

CocoaPods with Realm

我正在尝试使用 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 不满意的两个潜在语法错误:

  1. Uncomment this line if you're using Swift 需要注释掉(它指的是它下面的行。;))

  2. Tests目标中,应该是pod 'RealmSwift'。撇号现在在 'pod' 前面。

请尝试更正这两个语法问题,如果不能解决问题,请告诉我。 :)