tristanhimmelman / AlamofireObjectMapper

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

Alamofire 5.0.0-rc.2 compatible version? #286

Closed SagarUnagar closed 4 years ago

SagarUnagar commented 4 years ago

Hello all,

Which version is compatible with Alamofire 5.0.0-rc.2?

Best

maoobordel commented 4 years ago

+1

SagarUnagar commented 4 years ago

Pods,

pod 'Alamofire'
pod 'AlamofireObjectMapper', '~> 6.1.0'

Errors,

image

RomanPodymov commented 4 years ago

Hello @SagarUnagar @maoobordel I created a pull request with Alamofire 5.0.0-rc.2 support. If you use CocoaPods just replace pod 'AlamofireObjectMapper', '~> 6.1.0' with pod 'AlamofireObjectMapper', :git => 'https://github.com/RomanPodymov/AlamofireObjectMapper.git', :branch => 'master' in your Podfile.

SagarUnagar commented 4 years ago

@RomanPodymov Thank you for your fixes. Its seems working fine now. When will be it merged to the main branch?

RomanPodymov commented 4 years ago

@SagarUnagar Probably this question is for @tristanhimmelman.

yildirimatcioglu commented 4 years ago

@RomanPodymov I have some issues on your PR

Screen Shot 2019-09-23 at 15 13 14
RomanPodymov commented 4 years ago

Hello @wixvii Can you reproduce this issue on AlamofireObjectMapper 6.1.0?

yildirimatcioglu commented 4 years ago

@RomanPodymov yeah both have the same issue

ozgur commented 4 years ago

@wixvii I believe it should be fixed in https://github.com/tristanhimmelman/AlamofireObjectMapper/pull/288

Could you please check if the problem is gone?

RomanPodymov commented 4 years ago

@wixvii How do you install AlamofireObjectMapper? What Swift version are you using?

mmkbmb commented 4 years ago

I have the same problem. I use Swift5 and Xcode11.

pod 'AlamofireObjectMapper', '~> 6.1.0' and pod 'AlamofireObjectMapper', :git => 'https://github.com/RomanPodymov/AlamofireObjectMapper.git', :branch => 'master' fail.

RomanPodymov commented 4 years ago

Hello @wixvii @ozgur @chanmomo413 Can you please share an example project where you can reproduce these errors?

yildirimatcioglu commented 4 years ago

@chanmomo413 I use legacy build system and it fixed it.

maoobordel commented 4 years ago

same problem as wixvii , but legacy build system didnt helped. :(

when i get version from "Ozgur" fork , i got "no such module 'ObjectMapper'" error. So not version /fork working at all :-x

maoobordel commented 4 years ago

is it possible to merge that pull request (from ozgur about swift5 compatibility) ? because i cannot add fork repo to podspec dependency. Thank you so much guys

tristanhimmelman commented 4 years ago

I have just merged and released the PR to resolve this. Thanks @RomanPodymov

suryakantkachhi commented 4 years ago

Hi

I'm still getting this error with below pods, i tried all mentioned Git master but nothing working.

Getting this error in XCODE11 with swift 5.

When i use AFDataResponse instead of DataResponse then issue go away. i don't whether its the correct approach to resolve the same ?

Please Help me to get out of it. thanks

pod 'Alamofire', '~> 5.0.0-rc.2' pod 'ObjectMapper', '~> 3.4'

pod 'AlamofireObjectMapper', :git => 'https://github.com/tristanhimmelman/AlamofireObjectMapper.git', :branch => 'master'

pod 'AlamofireObjectMapper', :git => 'https://github.com/RomanPodymov/AlamofireObjectMapper.git', :branch => 'master'

pod 'AlamofireObjectMapper', :git => 'https://github.com/ozgur/AlamofireObjectMapper.git', :branch => 'master'

pod 'AlamofireObjectMapper', '~> 6.2.0'

pod 'AlamofireObjectMapper', '~> 5.2'

pod 'Alamofire', '~> 4.0.0'

Screenshot 2019-11-03 at 7 16 23 PM

RomanPodymov commented 4 years ago

Hello @suryakantkachhi AlamofireObjectMapper 6.2.0 uses Alamofire 5.0.0-rc.2. As you can see in Alamofire 5.0.0-rc.1 release notes 2 new typealiases were added (AFDataResponse and AFDownloadResponse). So you can use AFDataResponse<LoginDSModel> instead of DataResponse<LoginDSModel, AFError>. If you want to use Alamofire 5.0.0-rc.3 replace pod 'AlamofireObjectMapper' with pod 'AlamofireObjectMapper', :git => https://github.com/RomanPodymov/AlamofireObjectMapper.git in your Podfile.

suryakantkachhi commented 4 years ago

Hello @RomanPodymov i have used Alamofire 5.0.0-rc.3 replaced pod 'AlamofireObjectMapper' with pod 'AlamofireObjectMapper', :git => https://github.com/RomanPodymov/AlamofireObjectMapper.git in Podfile hence encountered with below error.

It seems like source master branch doesn't exist?

[!] Error installing AlamofireObjectMapper [!] Failed to download 'AlamofireObjectMapper': [!] /usr/local/bin/git clone https://github.com/RomanPodymov/AlamofireObjectMapper.git /var/folders/tb/ly7jxws951zbtkffmcyycf2c0000gn/T/d20191103-1218-17hf24n --template= --single-branch --depth 1 --branch master

Cloning into '/var/folders/tb/ly7jxws951zbtkffmcyycf2c0000gn/T/d20191103-1218-17hf24n'... warning: Could not find remote branch master to clone. fatal: Remote branch master not found in upstream origin Screenshot 2019-11-03 at 9 17 27 PM

RomanPodymov commented 4 years ago

Hello @suryakantkachhi Try again please, I restored this branch.

suryakantkachhi commented 4 years ago

Much thanks 👍 @RomanPodymov now its installed. Screenshot 2019-11-03 at 10 26 33 PM