Post

Replies

Boosts

Views

Activity

iOS 15 replace rootViewController failed while applicationDidBecomeActive
I need change the rootViewController while applicationDidBecomeActive called. So I use this kind of code to do this work and it works well before.    [UIApplication sharedApplication].keyWindow.rootViewController = newViewController; But after upgrade to iOS 15, this will make the keyWindow lose the rootViewController and get a blank page. After serval try, I found it could work after delay 0.1 seconds.
0
0
795
Sep ’21
How to avoid show the location usage prompt while app in background?
My app needs monitors the iBeacon, so it needs always access the location service. But it always show this prompt - https://support.apple.com/library/content/dam/edam/applecare/images/en_US/iOS/ios13-iphone-xs-app-using-location-in-background.jpg to let user change the setting to 'while using'. It's confuse for users, and I also not call the location service at background. How to avoid show this prompt? Which API call trigger this prompt?
5
0
1.1k
Feb ’21