cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Please Add An Additional Step To The Swift API instructions

Please Add An Additional Step To The Swift API instructions

Walt W.
New member | Level 2

I just finished successfully installing the swift dropbox framework in Xcode. I followed the instructions at https://www.dropbox.com/developers/documentation/swift#install . I kept getting the error message on my import statement for SwiftyDropbox saying "No such module 'SwiftyDropbox'". I spent several hours working to fix this and kept reinstalling using cocoapods thinking I did something wrong. Turns out that I needed to add the framework manually under the General tab in the "Linked Frameworks And Libraries" category. This is a step that is not in the instructions. As I am sill somewhat new to iOS development I didn't automatically know to do this. I simple tried it out of desperation. 

Please add the instruction for manually setting up the framework in Xcode so others don't have to go through the same frustration that I did.

Thanks

9 Replies 9

Re: Please Add An Additional Step To The Swift API instructions

Greg-DB
Dropboxer

Hi Walt, thanks for the report! I don't believe this step should be necessary though, and I haven't experienced this issue in my own testing. Can you share the version numbers of Xcode, Cocoapods, and SwiftyDropbox you have so we can try to reproduce it? (Also, one thing that comes to mind is whether or not you switched to using the .xcworkspace file instead of the .xcodeproj one after pod install.)

Re: Please Add An Additional Step To The Swift API instructions

Michael K.57
New member | Level 1

I was about to lose my mind until I found this!!! Nowhere in the documentation, or tons of web searching, did I find this out until I stumbled upon this thread.

(I'm referring to "switching to using the .xcworkspace instead of .xcodeproj...).

This might be common knowledge to some, but certainly not all. That bit of info should be included in your docs because while I've written a bunch of apps over several different iOS versions etc, I've never had to use cocoapods before and it is a confusing PITA without little nuggets of info like this.

Thanks!

Re: Please Add An Additional Step To The Swift API instructions

Greg-DB
Dropboxer

I'm glad my post was able to help sort this out for you Michael! For reference, the install page for the Swift SDK mentions this as such:

"If your project is open in Xcode, you'll need to close it and re-open the project workspace (.xcworkspace file) in Xcode for everything to work properly."

That could be clearer though, so I'll send this along as feedback. This is just part of using cocoapods though, and the output from "pod install" does say the following, so we probably won't want to duplicate too much of that, lest it change in the future:

"[!] Please close any current Xcode sessions and use `<project>.xcworkspace` for this project from now on."

Re: Please Add An Additional Step To The Swift API instructions

Nelson C.7
New member | Level 1

-

I just finished successfully installing the swift dropbox framework in Xcode. I followed the instructions at https://www.dropbox.com/developers/documentation/swift#install . I kept getting the error message on my import statement for SwiftyDropbox saying "No such module 'SwiftyDropbox'". I spent several hours working to fix this and kept reinstalling using cocoapods thinking I did something wrong. Turns out that I needed to add the framework manually under the General tab in the "Linked Frameworks And Libraries" category. This is a step that is not in the instructions. As I am sill somewhat new to iOS development I didn't automatically know to do this. I simple tried it out of desperation. 

Please add the instruction for manually setting up the framework in Xcode so others don't have to go through the same frustration that I did.

Thanks--

 

so where is the framework found that we are supposed to add to Linked Frameworks and Libraries?  Doesn't seem to be in the swift-dropbox-master.

Re: Please Add An Additional Step To The Swift API instructions

Greg-DB
Dropboxer

Hi Nelson, there's no framework that you're supposed to add for SwiftyDropbox. The install is handled just by CocoaPods. We haven't heard back from Walt on this thread, so presumably his issue was resolved. Are you having any problems when following the instructions to install SwiftyDropbox?

Re: Please Add An Additional Step To The Swift API instructions

Nelson C.7
New member | Level 1

 

-Hi Nelson, there's no framework that you're supposed to add for SwiftyDropbox. The install is handled just by CocoaPods. We haven't heard back from Walt on this thread, so presumably his issue was resolved. Are you having any problems when following the instructions to install SwiftyDropbox?-

I haven't used CocoaPods before but it looks like it installed correctly:

--CocoaPods 1.0.0.beta.2 is available.

To update use: `gem install cocoapods --pre`

[!] This is a test version we'd love you to try.

 

For more information see http://blog.cocoapods.org

and the CHANGELOG for this version http://git.io/BaH8pQ.

 

Analyzing dependencies

[!] Could not automatically select an Xcode project. Specify one in your Podfile like so:

 

    xcodeproj 'path/to/Project.xcodeproj'

 

Nelsons-MacBook-Air:dropbox nelson$--

 

However, when I try to compile the PhotoWatch project, there is a missing module SwiftyDropBox. I thought therefore that I would need to link in a binary from somewhere.  Where am I going wrong?

 

thanks!

 

></p>
<p> </p>

Re: Please Add An Additional Step To The Swift API instructions

Greg-DB
Dropboxer

When using apps that use CocoaPods, you need to open the ".xcworkspace" file, instead of the ".xcodeproj" file. If you use the latter, you'll get this error, so please try with "PhotoWatch.xcworkspace".

Re: Please Add An Additional Step To The Swift API instructions

Nelson C.7
New member | Level 1

I opened the xcworkspace file for the PhotoWatch app in Xcode and now I get error on the attached screenshot.  Appreciate the help!

 

 

 

></p>

Re: Please Add An Additional Step To The Swift API instructions

Greg-DB
Dropboxer

That seems to be a codesigning issue, indicating the project isn't set up with the valid signing identities, which is expected since you downloaded it from us, for which you don't have the corresponding keys. You can try using "Fix Issue" to have Xcode set up your own signing identities in the project.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Nelson C.7 New member | Level 1
What do Dropbox user levels mean?
Need more support?