You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

ShiminCai's avatar
ShiminCai
Helpful | Level 6
8 years ago

Alamofire compilation errors after installing the SwiftyDropbox in Xcode project with CocoaPods

Hi there,

 

Since the Dropbox API V1 has been turned off, the file download and upload in all our apps are not working any more. I'm now migrating to the API V2 and using Xcode 8.3.3 and Swift.

 

I followed the instructions here: https://github.com/dropbox/SwiftyDropbox#get-started and successfully installed the SwiftyDropbox and its dependency Alamofire:

 

Analyzing dependencies

Downloading dependencies

Installing Alamofire (3.5.1)

Using ArcGIS-Runtime-SDK-iOS (10.2.5)

Using SVProgressHUD (2.2.1)

Installing SwiftyDropbox (3.3.1)

Generating Pods project

Integrating client project

Sending stats

Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.

 

My podfile looks like this:

 

# Uncomment this line to define a global platform for your project

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

 

target 'FCMapApp' do

    # comment this line if you're not using Swift and don't want to use dynamic frameworks'

    use_frameworks!

 

    # Pods for FCMapApp

 

    # pod 'Dropbox-iOS-SDK'

    #pod 'Alamofire'

    pod 'SwiftyDropbox'

    pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'

    pod 'ArcGIS-Runtime-SDK-iOS', '10.2.5'

 

    target 'FCMapAppTests' do

    inherit! :search_paths

 

    # Pods for testing

    end

end

 

But when I tried to build the project I got 267 Alamofire-related Swift compiler errors!!! I'm not sure what I'm doing wrong... Can anyone please help?

 

Thank you in advance.

 

Shimin

  • Greg-DB's avatar
    Greg-DB
    8 years ago

    Thanks! That looks like a bug in SwiftyDropbox v4.2.0 when using Xcode 8. We'll look into it. In the meantime, you can use v4.1.2, by specifying it in your Podfile like:

     

    pod 'SwiftyDropbox' => '4.1.2'

    Then, do a `pod update`.

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    Hi Shimin, did you have Xcode try to convert the version of Swift code for the pods by any chance? The pods currently use Swift 3 and the code shouldn't be modified. If you did have Xcode modify them, uninstall and re-install them to get clean versions.

    Otherwise, can you share the errors you're getting so we can take a look? Thanks in advance!

    By the way, if you need more time to migrate your app to API v2, we can offer an extension for access to API v1. To request that, please open an API ticket with the relevant app key(s):

    https://www.dropbox.com/developers/contact
    • ShiminCai's avatar
      ShiminCai
      Helpful | Level 6

      Hi Greg-DB,

       

      I replied the eamil sent to me from Dropbox Forum with the error info and steps of how I generated the errors. Did you get that email? Or do I need to put the info in this thread?

       

      Thanks a lot for your help.

       

      Shimin

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        ShiminCai I don't believe replying to the notification email sends the content anywhere I can access it. Please post the information in the thread here. (If you need to share it privately for some reason, you can open an API ticket here instead.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 4 days ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!