No such module 'SwiftyDropbox'

ぐ巨炮叔叔 提交于 2019-12-22 13:53:56

问题


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

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'

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.


回答1:


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.



来源:https://stackoverflow.com/questions/40646380/no-such-module-swiftydropbox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!