Hi, is there a way to try/catch an `IncorrectDeref...
# announcements
s
Hi, is there a way to try/catch an
IncorrectDereferenceException
? I want to use the iOS CMAltimeter class, but it's callback gets called from a non-main-thread when
altimeter?.stopRelativeAltitudeUpdates()
is called. I tried a surrounding
try
and
catch
, but no luck. I can not freeze the callback, because that would freeze
update()
too. I really don't know what else to do right now.
Copy code
altimeter = CMAltimeter()
            altimeter?.startRelativeAltitudeUpdatesToQueue(NSOperationQueue.mainQueue) { data: CMAltitudeData?, error: NSError? ->
                update(data.pressure.doubleValue)
            }
Can the relaxed mode help? If so, how to enable it? Slack Conversation