Detect if the Music app (or other system application) was hidden on iOS 10

In the new version of iOS, users finally have the ability to โ€œremoveโ€ (actually hide) applications that they donโ€™t want, for example. The Promotions app or the Music app.

The problem with hiding the Music app is that when you try to play the deviceโ€™s music library (formally called the iPod library), you MPMusicPlayerControllerโ€™ll have problems.

A call [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"music://"]]is the first thing that comes to mind, however, it always returns YES, regardless of the Music application installed.

How can we determine if a user has this application installed or not?

+4
source share

Source: https://habr.com/ru/post/1666253/


All Articles