【问题标题】:CocoaPods with Realm带有 Realm 的 CocoaPods
【发布时间】:2015-10-16 08:18:24
【问题描述】:

我正在尝试使用 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
#  
#  -------------------------------------------

【问题讨论】:

    标签: ios cocoapods realm


    【解决方案1】:

    我想我可以在其中看到 CocoaPods 不满意的两个潜在语法错误:

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

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

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

    【讨论】:

    • 感谢@TiM,我就是这样做的,而且花了很长时间才更新。我不知道我的互联网现在是不是很慢或者是什么。我认为那条线看起来也很愚蠢。你在 Realm 的 SF 办公室工作吗?我看到你的 github 和 SO 个人资料说珀斯。
    • 科迪别担心!我很高兴这有效(因为我不知道它还会是什么!)。是的,我现在想知道这些说明是否应该重新措辞更具体一些。哈哈,没错。我住在珀斯,远程为 Realm 工作。 :)
    • 该死的没关系,我下周四要去 Realm SF 办公室,看看你是否想喝咖啡。我刚刚给你发了推文。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-13
    • 1970-01-01
    • 1970-01-01
    • 2017-02-10
    相关资源
    最近更新 更多