ios - locationmanager does not have a member named verbosedictionary -


my working code giving error when upgraded xcode 6.2

"error: locationmanager not have member named verbosedictionary"

this line in throwing error: verbosemessage = verbosemessagedictionary[verbosekey]!

------------------ reference code in locationmanager.swift

internal func locationmanager(manager: cllocationmanager!,         didchangeauthorizationstatus status: clauthorizationstatus) {             var hasauthorised = false             var verbosekey = status             switch status {             case clauthorizationstatus.restricted:                 locationstatus = "restricted access"             case clauthorizationstatus.denied:                 locationstatus = "denied access"             case clauthorizationstatus.notdetermined:                 locationstatus = "not determined"             default:                 locationstatus = "allowed access"                 hasauthorised = true             }          verbosemessage = verbosemessagedictionary[verbosekey]! 

for reason latest version of swift has changed clauthorizationstatus.authorized clauthorizationstatus.authorizedalways , introduced error in declaration of verbosemessagedictionary in locationmanager.swift

after making change, error got fixed. happens when have locationmanager , upgrade xcode 6.2

hope helps others!

private let verbosemessagedictionary = [clauthorizationstatus.notdetermined:"you have not yet made choice regards application.", clauthorizationstatus.restricted:"this application not authorized use location services. due active restrictions on location services, user cannot change status, , may not have denied authorization.", clauthorizationstatus.denied:"you have explicitly denied authorization application, or location services disabled in settings.", clauthorizationstatus.authorized:"app authorized use location services.",clauthorizationstatus.authorizedwheninuse:"you have granted authorization use location when app visible you."]


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -