gpt4 book ai didi

swift - 没有这样的模块 'SwiftyDropbox'

转载 作者:可可西里 更新时间:2023-11-01 00:58:02 25 4
gpt4 key购买 nike

首先 - 我正在使用 Xcode 8 和 Swift 3。现在我想在我的应用程序中集成 Dropbox API (SwiftyDropbox)。因为我是 iOS 编程的新手,所以我不确定我是否正确完成了所有步骤。
我决定使用 CocoaPods。所以我安装了 Pods 工具并切换到我的项目目录。这是保存我的 .xcodeproj 文件的目录。我希望这是正确的?
我调用了“pod init”并添加了 SwiftyDropbox 框架。我的 Podfile 看起来像这样:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'MyProjectName' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for Legantoo
pod 'SwiftyDropbox'

end

然后我执行了“pod install”。到目前为止,一切正常。
在 Xcode 中打开我的项目后,我在项目导航器中看到一个名为“Pods”的新组,因此我认为集成已成功完成。
现在我按照步骤在 AppDelegate.swift 中实现 Dropbox 授权过程。为此,我必须包含 Dropbox API

import SwiftyDropbox

这正是我的问题:如果我构建项目,那么我会得到错误

 No such module 'SwiftyDropbox'

而错误行是带有 import 语句的那一行。我忽略了一步吗?我已经完全清理 (Cmd+c) 但错误仍然存​​在。

最佳答案

将任何 pod 安装到您的项目后,您必须通过 .xcworkspace 文件打开您的项目。您不能通过 .xcodeproject 或直接在 Xcode 中打开它。

关于swift - 没有这样的模块 'SwiftyDropbox',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40646380/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com