evermeer / EVReflection

Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift
Other
966 stars 119 forks source link

Build error with Xcode 10.2 (beta) #299

Closed corteggo closed 5 years ago

corteggo commented 5 years ago

Trying to build EVReflection for iOS with Xcode 10.2 (beta) shows the following error:

EVObject does not conform to protocol EVReflectable

If I try to implement missing methods (which is actually just the == operator), I can't because at least one of the arguments must be of type EVObject while the protocol has EVReflectable in both arguments.

I've removed == and != declarations in the EVReflectable protocol and I've been able to build it without errors. Everything seems to work fine but I didn't test other targets.

evermeer commented 5 years ago

I guess it's time to download the latest beta.

evermeer commented 5 years ago

I have created a Swift5.0 branch with an initial conversion. EVReflection.Core seems to work. I do have some issues with subspecs that use other dependencies. I'm trying to fix that soon.

corteggo commented 5 years ago

Great, thanks for the effort.

bj97301 commented 5 years ago

Hey now getting this with Version 10.2 (10E125) non beta. I am using swift 4.2. Is there anything I can do to help? Switching to the 5.0 branch and updating my project to swift 5.0 seems to fix it but I am not sure I am ready to move to 5.0 yet.

jaelee1993 commented 5 years ago

Hey guys, I am facing the same issue here. What was the way around it without updating to Swift 5? I tried @corteggo 's way but did not work. Thanks!

evermeer commented 5 years ago

@corteggo and @bj97301 The current master should support both Swift 4.2 and 5.0 What version do you get if you do a pod update? This should be 5.10.1. You might require (not sure) to use cocoapods 1.7.0 because that supports multiple swift versions.