2

Why below code can't open 'Setting' in iPhone 6s Plus with iOS9.2.1, but can in iPhone 6s.

 NSURL *url = [NSURL URLWithString:@"prefs:root=WIFI"];    
 if ([[UIApplication sharedApplication] canOpenURL:url]) {      
   [[UIApplication sharedApplication] openURL:url];   
  }
Jone
  • 254
  • 3
  • 10

2 Answers2

1

Detail should be this : go to

Target -> Info -> URL Types

add item like this:

enter image description here

Jone
  • 254
  • 3
  • 10
0

Can you try this

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
Kamlesh Shingarakhiya
  • 2,757
  • 2
  • 16
  • 34