evermeer / AlamofireJsonToObjects

An Alamofire extension which converts JSON response data into swift objects using EVReflection
Other
161 stars 28 forks source link

Swift Compiler Error for Xcode 8.3 #42

Closed KarpenkoAV closed 7 years ago

KarpenkoAV commented 7 years ago

Please help to solve the problem Through a pod installed AlamofireJsonToObjects (2.4.1) When compiling, I see 2 errors: AlamofireJsonToObjects.swift: 68: 72: 'NSDictionary' is not convertible to '[AnyHashable: Any]'; Did you mean to use 'as!' To force downcast? AlamofireJsonToObjects.swift: 130: 98: 'NSDictionary' is not convertible to '[AnyHashable: Any]'; Did you mean to use 'as!' To force downcast?

Xcode Version 8.3 (8E162)

In their Xcode 8.2.1 everything worked fine

evermeer commented 7 years ago

could you please switch from AlamofireJsonToObjects to EVReflection/Alamofire

pod 'EVReflection/Alamofire'

The functionality is the same. Only EVReflection is maintained actively. EVReflection works on Xcode 8.3 Early next week I have time for updating AlamofireJsonToObjects

KarpenkoAV commented 7 years ago

Switching, there are no errors at compilation now. Thank you for your works!

wajahatch888 commented 7 years ago

@evermeer , I am using Xcode 8.3.2. I have replaced pod 'AlamofireJsonToObjects' with pod 'EVReflection/Alamofire' but it is not building anymore. I can separately build Almofire and EvReflection scheme but after removing AlamofireJsonToObjects it is unable to find method. screen shot 2017-05-23 at 3 06 07 pm

evermeer commented 7 years ago

@wajahatch888 have you also changed your import AlamofireJsonToObjects to import EVReflection

wajahatch888 commented 7 years ago

@evermeer , Yes i have done this.

evermeer commented 7 years ago

Ah, but you are using Result which is an old Alamofire feature. It has changed to:

        .responseObject { (response: DataResponse<ResponseModel>) in

For details see https://github.com/evermeer/EVReflection/blob/master/UnitTests/AlamofireTests/AlamofireTests.swift

wajahatch888 commented 7 years ago

Thanks alot 👍