LocationPicker icon indicating copy to clipboard operation
LocationPicker copied to clipboard

Compilation error on XCode 10.2

Open barylevy opened this issue 5 years ago • 8 comments

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'

barylevy avatar May 01 '19 08:05 barylevy

same issue

brandy2015 avatar May 05 '19 09:05 brandy2015

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

try this

brandy2015 avatar May 05 '19 09:05 brandy2015

+1 for the compilation issue

10000TB avatar Sep 16 '19 00:09 10000TB

    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 avatar Sep 16 '19 00:09 10000TB

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

10000TB avatar Sep 16 '19 00:09 10000TB

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

JoniVR avatar Jan 19 '20 00:01 JoniVR

+1 for compilation issue

podspec isn't updated yet !

rollin-s avatar Jan 29 '20 15:01 rollin-s

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"

JoniVR avatar Jan 31 '20 15:01 JoniVR