xcode8 swift3 crash when calling requestLocation(:withDesiredAccuracy:timeout:delayUntilAuthorized:
Closed this issue · 1 comments
Hello,
I just installed xcode8 and updated my current project to swift3. The automatic code conversions to swift3 changed the call to requestLocationWithDesiredAccurancy to the one down below:
INTULocationManager.sharedInstance().requestLocation(withDesiredAccuracy: .block, timeout: 60.0, delayUntilAuthorized: true, block:updateLocationIfAccurateEnough as! INTULocationRequestBlock)
It compiled, but the app crashes right away but doesn't tell me anything whats wrong other than breaking at a breakpoint "EXC_BREAKPOINT, code=1, subcode=0x10043f650".
Can you replicate that and may have a solution?
Thank you!
Daniel
The problem was that the auto conversion of xcode changed the signature of my updateLocationIfAccurateEnough
which lead as! INTULocationRequestBlock
to fail. After correcting that as! INTULocationRequestBlock
wasn't necessary anymore and everything runs smoothly.