//上面的链接里面有一种方式可以跳到自己的app。也就是下面这种组合
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Apps&path=Your+App+Display+Name"]];
- (void) openSettingsApp{
NSString *appDisplayName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"prefs:root=Apps&path=%@", appDisplayName]]];
}
//但是尝试未果,反而跳到系统的设置页面。后来找到了下面的方法供参考
NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:appSettings];
网友评论