简体   繁体   English

没有这样的模块“SwiftyDropbox”

[英]No such module 'SwiftyDropbox'

First of all - I'm working with Xcode 8 and Swift 3. Now I want to integrate the Dropbox API (SwiftyDropbox) in my app.首先 - 我正在使用 Xcode 8 和 Swift 3。现在我想在我的应用程序中集成 Dropbox API (SwiftyDropbox)。 Because I'm very new in iOS programming I'm not sure if I've done all the steps correctly.因为我是 iOS 编程的新手,所以我不确定我是否正确完成了所有步骤。
I decided to use CocoaPods.我决定使用 CocoaPods。 So I innstalled the Pods tool and changed to the directory of my project.于是我安装了Pods工具,切换到我的项目目录下。 It's that directory which holds my .xcodeproj file.这是保存我的 .xcodeproj 文件的目录。 I hope this is correct?我希望这是正确的吗?
I called "pod init" and added the SwiftyDropbox framework.我调用了“pod init”并添加了 SwiftyDropbox 框架。 My Podfile looks like this:我的 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

Then I executed "pod install".然后我执行了“pod install”。 Until now all is working without any problems.到目前为止,一切正常,没有任何问题。
After open my project in Xcode I see a new group called "Pods" in the project navigator so I think the integration was completed successfully.在 Xcode 中打开我的项目后,我在项目导航器中看到一个名为“Pods”的新组,因此我认为集成已成功完成。
Now I followed the steps to implement the Dropbox authorization process in AppDelegate.swift.现在我按照步骤在 AppDelegate.swift 中实现了 Dropbox 授权流程。 For that purpose I have to include the Dropbox API by为此,我必须通过以下方式包含 Dropbox API

import SwiftyDropbox

And exactly here's my problem: If I build the project then I will get the error这正是我的问题:如果我构建项目,那么我会收到错误

 No such module 'SwiftyDropbox'

And the line of the error is that one with the import statement.错误所在的那一行是带有 import 语句的那一行。 Have I overlooked a step?我是否忽略了一步? I already made a full clean (Cmd+c) but the error still exists.我已经完全清理(Cmd + c)但错误仍然存​​在。

After installing any pods to your project, you must open your project by .xcworkspace file.将任何 Pod 安装到您的项目后,您必须通过 .xcworkspace 文件打开您的项目。 You can't do it by .xcodeproject or opening it directly in Xcode.你不能通过 .xcodeproject 或直接在 Xcode 中打开它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM