No Way to Determine if Apple Maps is Installed
Originator: | randyibeat | ||
Number: | rdar://33381545 | Date Originated: | 07/18/2017 |
Status: | Open | Resolved: | No |
Product: | UIKit | Product Version: | iOS 10 or later |
Classification: | Reproducible: | Yes |
Area: UIKit Summary: In order to provide a smoother user experience, we would like to display our own prompt (suppressing the system "Restore 'Maps'?" prompt when the user has "uninstalled/hidden" Apple Maps in iOS 10 or later, and our app tries to launch Apple Maps. We have tried calling `UIApplication.shared.canOpenURL("http://maps.apple.com")`, but this always returns `true` regardless of whether the user has Apple Maps installed. Steps to Reproduce: 1) Uninstall Apple Maps by long pressing "Maps" app on home screen and tapping top left "X" button. 2) Call `UIApplication.shared.canOpenURL("http://maps.apple.com")` from any app. Expected Results: I would expect `UIApplication.shared.canOpenURL("http://maps.apple.com")` to return `false` because Apple Maps cannot be launched immediately. Observed Results: `UIApplication.shared.canOpenURL("http://maps.apple.com")` returns `true`. When I subsequently call `UIApplication.shared.open("http://maps.apple.com", options: [:], completionHandler: nil)`, the attached system alert is presented rather than giving the developer a hook to handle the case where Apple Maps is not installed. Version: iOS 10 and later.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!