tristanhimmelman / AlamofireObjectMapper

An Alamofire extension which converts JSON response data into swift objects using ObjectMapper
MIT License
2.66k stars 472 forks source link

AlamofireObjectMapper 6 + Alamofire 4 (latest final versions) not compatible #264

Open nickafkhami opened 5 years ago

nickafkhami commented 5 years ago

It seems to me that the latest final release AlamofireObjectMapper 6 is not (downward) compatible with the latest final version of Alamofire (4; 5 is still beta).

So this combination using Carthage has stopped working since:

github "Alamofire/Alamofire"
github "tristanhimmelman/AlamofireObjectMapper"

This, however, works:

github "Alamofire/Alamofire"
github "tristanhimmelman/AlamofireObjectMapper" ~> 5.2

Is this known and accepted? Shouldn't a new final version of AlamofireObjectMapper be compatible with the latest final version of Alamofire (it will soon presumably, but not yet)? As a consequence, this could mean that AlamofireObjectMapper 6 would remain beta for at least as long as Alamofire 5.

By the way, thank you for providing this and other great libraries!

rzulkoski commented 5 years ago

@niccey, I've created a fork that is compatible with Xcode 10.2. It upgrades the Swift version from 3.0 to 4.0.

Try putting this in your Cartfile:

github "rzulkoski/AlamofireObjectMapper" "migrate-to-swift-4"

@tristanhimmelman, is it possible to merge my changes in a hotfix release? Say 5.3.0? Here's my branch.

kublaios commented 5 years ago

@niccey, I've created a fork that is compatible with Xcode 10.2. It upgrades the Swift version from 3.0 to 4.0.

Try putting this in your Cartfile:

github "rzulkoski/AlamofireObjectMapper" "migrate-to-swift-4"

@tristanhimmelman, is it possible to merge my changes in a hotfix release? Say 5.3.0? Here's my branch.

Thank you, that was the only way I could get around dyld: Symbol not found error. I hope the repo gets maintained soon.

nickafkhami commented 5 years ago

@kublaios That's right, with Xcode 10.2 that is. I ran into the same problem now. My above Cartfile definition worked until Xcode 10.1.

Thanks, @rzulkoski. Your solution is not directly related to my OP but it solves this new Xcode 10.2 problem. With Xcode 10.2 and without your branch, I couldn't even get it to work with AlamofireObjectMapper 6 + Alamofire 5 Beta, I think I got the error mentioned by @kublaios. I guess this issue affects many users of this library.

rzulkoski commented 5 years ago

Yeah, #266 references the same issue and has a similar fix. Whenever Alamofire 5 is officially released we should all be able to go back to master, but I'll be using this fork in the meantime. Glad you guys were able to get back up and running. /cheers

RomanPodymov commented 5 years ago

Hello @niccey I think you should try AlamofireObjectMapper 5.2.1. It uses Alamofire 4.8.2.