cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

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: 
Highlighted

Swift 5.0.1 build error

Helpful | Level 6

I came back to my app to make a change after a few months.  Before I could open Xcode, I had to upgrade to release 10.2.1, and I had to update MacOS to 10.14.5. During that time, I also upgraded my iPhone to iOS 12.2.

Since the upgrade, I can't build my project.  I'm getting the following error:

Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.0.1 compiler: /Users/rjkinsman/Dropbox/Nvelopes iOS/Nvelopes Project/Nvelopes/Carthage/Build/iOS/SwiftyDropbox.framework/Modules/SwiftyDropbox.swiftmodule/arm64.swiftmodule

So I went back to Xcode 10.1 and I was able to build my project with no problem.  However, when I go to test it on my phone, I get the following:

Could not locate device support files.

This iPhone... is running iOS 12.2... which may not be supported by this version of Xcode

So I'm caught in the middle.  Where do I go from here?

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Swift 5.0.1 build error

Dropboxer
Dropboxer

Do you still have Xcode 10.1 installed? Carthage still may be using that to build if so. 

In that case, trying using `sudo xcode-select -switch /Applications/Xcode-10.2.app/` (or whatever your new Xcode path is) first to switch to the new one, and then run the Carthage build again.

View solution in original post

4 Replies 4
Highlighted

Re: Swift 5.0.1 build error

Dropboxer
Dropboxer

I believe you do need to use at least version 10.2 of Xcode in order to debug on iOS 12.2, so using at least Xcode 10.2 seems necessary (as opposed to Xcode 10.1). 

That means you'll need to get your copy of the SwiftyDropbox library working with the Swift 5.0.1 compiler. You should be able to do so by running `carthage update --platform iOS` again. Please make sure you're also getting the latest version of SwiftyDropbox itself, which is current 5.0.0. (Check your Cartfile in case you're specifying a particular version.) Please give that a try and let me know if it helps.

Highlighted

Re: Swift 5.0.1 build error

Helpful | Level 6

Thanks, Greg.  Unfortunately, that didn't work.  Here are the messages from carthage:

Rolands-MacBook-Pro:Nvelopes rjkinsman$ carthage update --platform iOS
*** Fetching SwiftyDropbox
*** Fetching Alamofire
*** Checking out Alamofire at "4.8.2"
*** Checking out SwiftyDropbox at "5.0.0"
*** xcodebuild output can be found in /var/folders/ng/dzf2v52j7mxgfpc7jxpz80tr0000gn/T/carthage-xcodebuild.qEbvj1.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "SwiftyDropbox iOS" in SwiftyDropbox.xcodeproj

But after running this, I'm still getting the build error.

Highlighted

Re: Swift 5.0.1 build error

Dropboxer
Dropboxer

Do you still have Xcode 10.1 installed? Carthage still may be using that to build if so. 

In that case, trying using `sudo xcode-select -switch /Applications/Xcode-10.2.app/` (or whatever your new Xcode path is) first to switch to the new one, and then run the Carthage build again.

View solution in original post

Highlighted

Re: Swift 5.0.1 build error

Helpful | Level 6

Thanks, Greg!

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Polls
Have you been keeping up good habits while working from home?
We've created a working from home cheat sheet to help keep up on those habits, check it out here.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?