【问题标题】:Unable to add Parse using CocoaPods无法使用 CocoaPods 添加 Parse
【发布时间】:2015-09-26 16:41:25
【问题描述】:

以下是我使用CocoaPods 添加Parse 的步骤,但仍然出现未解决的错误。

添加的 Pod 文件:

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
pod 'Parse'

target 'GroomCal' do

end

target 'GroomCalTests' do

end

target 'GroomCalUITests' do

end

在那之后我做了pod install。 Parse 和 Bolts 框架已安装(我可以在 XCode 中看到它们)。

然后我添加了 -Bridging-Header.h 并在其中添加了 #import <Parse/Parse.h>

当我在AppDelegate.swift 文件中尝试import Parse 时,我仍然收到No such Module Parse 错误消息。我在这里错过了什么。

我也确实使用*.xcworkspace 文件打开了项目。

【问题讨论】:

    标签: ios swift parse-platform cocoapods bridging-header


    【解决方案1】:

    要快速使用 cocoapods,您需要添加标志 use_frameworks! 到 podfile 中,因为 swift 不允许添加静态库。

    来源Cocoapods blog

    【讨论】:

    • 在 podfile 中添加它的位置是否重要?在platform :ios, '8.0' 行之后就可以了吗?
    • 这是最常见的地方。
    • 万岁!谢谢,希望Parse 将其添加到他们的文档中(他们的大部分文档都非常棒),谢谢您。
    猜你喜欢
    • 1970-01-01
    • 2012-10-05
    • 1970-01-01
    • 1970-01-01
    • 2016-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多