Umgre
Umgre

Reputation: 667

URL scheme of notification settings for a specific app?

I found that

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=NOTIFICATIONS_ID"]];

goes to notification settings. Can I go into the notification settings of my app?

Upvotes: 1

Views: 2125

Answers (2)

Tuan Pham
Tuan Pham

Reputation: 631

Using bundle identifier for your app

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=NOTIFICATIONS_ID&path=com.my.app"]];

Upvotes: 0

Zaphod
Zaphod

Reputation: 7260

You can access, for example, mail notifications using :

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=NOTIFICATIONS_ID&path=Mail"]];

Use the bundle display name of your app in the path, instead of Mail.

Warning : This doesn't work anymore under iOS 5.1 (thanks smparkes for the comment)

Upvotes: 3

Related Questions