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: GitHub - better-apps/CDYelpFusionKit at add-swift5-support (my fork with edits)

--Dependencies:

---AlamofireObjectMapper: GitHub - adincebic/AlamofireObjectMapper: An Alamofire extension which converts JSON response data into swift objects using ObjectMapper

----Dependencies:

-----ObjectMapper:GitHub - better-apps/ObjectMapper at iphone-target-10.0 (my fork and branch with edits)

-----Alamofire: GitHub - Alamofire/Alamofire: Elegant HTTP Networking in Swift

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: Alamofire/Package.swift at master · Alamofire/Alamofire · GitHub

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