DEV Community

Discussion on: iOS 13: launchOptions always nil? This is the reason & solution

Collapse
 
dksmarttech profile image
dk-smart-tech • Edited

@nemecek_f have you found an alternative for UIApplication.LaunchOptionsKey.location in the above case.

I'm monitoring significant location updates and the app is being launched but with nil launch options and in scendelegate ConnectionOptions doesnt have a proper alternative.

Collapse
 
nemecek_f profile image
Filip Němeček

Hi! Maybe it is hidden in connectionOptions.userActivities? But I havent used this personally. Kind of frustrating that Apple does not document this better.. I would expect some info in the docs but no - developer.apple.com/documentation/...

Collapse
 
dksmarttech profile image
dk-smart-tech

I'm coding right now as we chat here! I'm going with a workaround: I don't care the location key is nil or not every time the app is launched I do operations that I need. And I control it with an if-case and decide whether to actually do it nor not!

Very frustrating. I'm sure many apps are relying on the launch options!!

I will update here by the end of the day, what I end up doing.

Collapse
 
aledap profile image
Iqra Padela • Edited

@dksmarttech Hi, I am having the same issue. iOS 14.4.2.
Did you find a proper solution for this?