Compiling for iOS 8.0 error

Hello,

I very new to Swift. I'm currently developing an App that will use the Yelp API. I found a package on Github called CDYelpFusionKit. After forking it and updating it to work with SPM and Swift 5.0 (and also a couple of it's dependencies) I was finally able to get SPM to import it and it's dependencies. Now, however, I am getting the following error when I compile. "Compiling for iOS 8.0, but module 'Alamofire' has a minimum deployment target of iOS 10.0:...".

I checked every setting I could think of. My deployment target on both the project and the target are set to above 10.0. After doing some digging, I found a deployment target setting in the .xcodeproj file of both CDYekpFusionKit and one if it's dependent packages (ObjectMapper) and changed those from 8.0 to 10.0. But it didn't fix it. I don't know where else to look. I removed the CDYelpFusionKit package and tried to import AlamoFire from a different .swift file and it worked fine. So it does seem like it's something in the CDYelpFusionKit package somewhere. Any ideas on where else I could look? See below for screenshot and links to the repositories. Using Xcode Version 11.3.1

Repos:

-CDYelpFusionKit: https://github.com/better-apps/CDYelpFusionKit/tree/add-swift5-support (my fork with edits)

--Dependencies:

---AlamofireObjectMapper: https://github.com/adincebic/AlamofireObjectMapper

----Dependencies:

-----ObjectMapper:https://github.com/better-apps/ObjectMapper/tree/iphone-target-10.0 (my fork and branch with edits)

-----Alamofire: https://github.com/Alamofire/Alamofire

Thanks in advance!

Try adding a platforms key to the Package.swift file of this library that sets the deployment target. See Alamofire’s here: https://github.com/Alamofire/Alamofire/blob/master/Package.swift#L29-L32

Nailed it!

I actually tried this already but SPM threw an error when importing the library. I must've mistyped something because it's working now.

Thanks for the help!

1 Like