zhuorantan / LocationPicker

A ready for use and fully customizable location picker for your app
MIT License
400 stars 79 forks source link

Compilation error on XCode 10.2 #44

Open barylevy opened 5 years ago

barylevy commented 5 years ago

Compilation error on XCode 10.2 Class: LocationItem In method: open override func isEqual(_ object: Any?) -> Bool

Error: Value of type 'AnyObject' has no member 'hashValue'

brandy2015 commented 5 years ago

same issue

brandy2015 commented 5 years ago

open override func isEqual(_ object: Any?) -> Bool { guard let object = object as AnyObject? else { return false } return object.hash == hash }

try this

10000TB commented 4 years ago

+1 for the compilation issue

10000TB commented 4 years ago
    open override func isEqual(_ object: Any?) -> Bool {
        guard let object = object else { return false }
        return (object as AnyObject).hashValue == hashValue
    }

Value of type AnyObject has no member hashValue

10000TB commented 4 years ago

cc: @zhuorantan - @brandy2015 's fix seems to work, would you consider endorsing it and merge it into future releases ?

JoniVR commented 4 years ago

This error is already resolved on master but the podspec just didn't get updated (and no new version got released yet apparently).

rollin-s commented 4 years ago

+1 for compilation issue

podspec isn't updated yet !

JoniVR commented 4 years ago

For people wanting to still use this lib and not wait for an updated podspec or new release, you should be able to use the following:

For cocoapods:

pod 'LocationPickerViewController', :git => 'https://github.com/zhuorantan/LocationPicker.git', :branch => 'master'

For carthage:

github "JeromeTan1997/LocationPicker" "master"