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.
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