Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode 8 beta Alamofire compiler errors after pod update to 3.4.1

I have downloaded a legacy swift app using git and run pod update. After git add -A, I open the workspace using xcode 8 beta then Product -> Clean and build I get 40 swift compiler Alamofire errors. I have not run convert o swift 2.3 or swift 3.

Podfile.lock has version 3.4.1 for Alamofire.

in Podfile I set the version to ios 10.0 and in Alamofire info also set infoDictionary version to 10.0 but it made no difference.

Mostly they are syntax errors like NSURL needs to be renamed URL, etc.

I can't find any answers to this problem with Google.

like image 824
markhorrocks Avatar asked Jun 28 '16 19:06

markhorrocks


1 Answers

Xcode 8 compiles against the iOS 10 SDK. This differs slightly from the iOS 9 SDK and thus the errors. You won't be able to use Xcode 8 with Swift 2.2 code.

If you look at the Alamofire branches, https://github.com/Alamofire/Alamofire/branches, you'll see work on 2.3 and 3.0 compatibility.

Also, read this thread for details on how to use those branches: https://github.com/Alamofire/Alamofire/issues/1312.

like image 146
Graham Perks Avatar answered Oct 19 '22 23:10

Graham Perks