evermeer / EVReflection

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

Unable to determine Swift version for the following pods when #302

Closed DubonYaar closed 5 years ago

DubonYaar commented 5 years ago

Hi. After updating to Cocopods version 1.6.1, When trying to install EReflection pod, i get following error :

[!] Unable to determine Swift version for the following pods:

i also tried installing older versions of EVRefelction and get the same error message.

my pod file looks like that: platform :ios, '10.0' target 'Example' do use_frameworks! pod 'EVReflection' end

post_install do |installer| installer.pods_project.targets.each do |target| if ['EVReflection'].include? target.name target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '4.0' end end end end

evermeer commented 5 years ago

Hello,

I did not specify a swift version for EVReflection because it's compatible with 4.0, 4.2 and 5.0 (beta) I think it should be solved when you set the swift version on your example project. (select the Example target, go to build settings. filter on 'swift lang' and set the version.

Regards, Edwin Vermeer

DubonYaar commented 5 years ago

the Example its an Objective-C project, there's no swift section in the build settings note that i didn't get that error beofre updating Cocoapods to the latest version.

DubonYaar commented 5 years ago

I've just fixed it by adding a Swift class file to the Objective-c project. It added the Swift section in the target's build settings. and it now works! Thanks