4

What I want

Check in my app whether Apple Music app is installed or not. For that I'm using canOpenURL() method and validate the result (boolean value).

Problem:

If Apple Music app already installed, canOpenURL() returns true, obviously. But after removing application from the real device, canOpenURL() return true as well. But expected result should be false ('cause the app isn't installed).

Additional info

I'm tested that workflow on iPhone XR, iOS 12.0.

Also, I've added in the Info.plist LSApplicationQueriesSchemes key, where wrote array with different app schemes. It's looks like

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>music</string>
        ....
    </array>

URL is next: URL(string: "audio-player-event://"). I'm also used another strings, like music:\\ and musics:\\.

I used this source to get all needed app schemes.

I'm also checked all corresponded questions on the SO (like this one), but no one has the reasonable answer.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
hamsternik
  • 1,376
  • 3
  • 18
  • 26
  • What URL exactly are you using? – mag_zbc Nov 15 '18 at 13:02
  • upd.: added URL in question description – hamsternik Nov 15 '18 at 13:38
  • 4
    Well, it's maybe due to the fact that stock Apple apps don't get removed from the system, they are only hidden (and there is a reason for that -- Federighi explains it in a Gruber interview). Nevertheless, I guess it could be easily classified as a bug, so I would file a bug report to Apple and hope that it gets fixed. – Alladinian Nov 15 '18 at 13:45

0 Answers0