Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

musukosan

macrumors 6502
Original poster
Aug 6, 2008
309
69
Puyallup, WA
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

Screen Shot 2020-03-17 at 10.01.50 PM.png


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!
 

musukosan

macrumors 6502
Original poster
Aug 6, 2008
309
69
Puyallup, WA
I ended up getting it to work by adding a platform key in the package.swift file of the CDYelpFusionKit library to target 10.0.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.