没有这样的模块"SwiftyDropbox" [英] No such module 'SwiftyDropbox'
问题描述
首先-我正在使用Xcode 8和Swift3.现在,我想在我的应用程序中集成Dropbox API(SwiftyDropbox).因为我是iOS编程的新手,所以我不确定是否正确完成了所有步骤.
我决定使用CocoaPods.因此,我安装了Pods工具,并更改为项目的目录.这是存放我的.xcodeproj文件的目录.我希望这是正确的吗?
我称其为"pod init",并添加了SwiftyDropbox框架.我的Podfile看起来像这样:
First of all - I'm working with Xcode 8 and Swift 3. Now I want to integrate the Dropbox API (SwiftyDropbox) in my app. Because I'm very new in iOS programming I'm not sure if I've done all the steps correctly.
I decided to use CocoaPods. So I innstalled the Pods tool and changed to the directory of my project. It's that directory which holds my .xcodeproj file. I hope this is correct?
I called "pod init" and added the SwiftyDropbox framework. My Podfile looks like this:
# 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:
Then I executed "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.
Now I followed the steps to implement the Dropbox authorization process in AppDelegate.swift. For that purpose I have to include the Dropbox API by
import SwiftyDropbox
这正是我的问题:如果我构建项目,那么我会得到错误
And exactly here's my problem: If I build the project then I will get the error
No such module 'SwiftyDropbox'
错误的那一行是带有import语句的那一行.我忽略了一步吗?我已经完全清理(Cmd + c),但错误仍然存在.
And the line of the error is that one with the import statement. Have I overlooked a step? I already made a full clean (Cmd+c) but the error still exists.
推荐答案
在将任何Pod安装到项目中之后,必须通过.xcworkspace文件打开项目.您无法通过.xcodeproject或直接在Xcode中打开它来完成此操作.
After installing any pods to your project, you must open your project by .xcworkspace file. You can't do it by .xcodeproject or opening it directly in Xcode.
这篇关于没有这样的模块"SwiftyDropbox"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!