ios 界面跳转设置

时间:2022-11-09 14:09:09
如下是跳转到系统设置诸多界面的url 

Key代码  ios 界面跳转设置
  1. prefs:root=General&path=About  
  2. prefs:root=General&path=ACCESSIBILITY  
  3. prefs:root=AIRPLANE_MODE  
  4. prefs:root=General&path=AUTOLOCK  
  5. prefs:root=General&path=USAGE/CELLULAR_USAGE  
  6. prefs:root=Brightness  
  7. prefs:root=General&path=Bluetooth  
  8. prefs:root=General&path=DATE_AND_TIME  
  9. prefs:root=FACETIME  
  10. prefs:root=General  
  11. prefs:root=General&path=Keyboard  
  12. prefs:root=CASTLE  
  13. prefs:root=CASTLE&path=STORAGE_AND_BACKUP  
  14. prefs:root=General&path=INTERNATIONAL  
  15. prefs:root=LOCATION_SERVICES  
  16. prefs:root=ACCOUNT_SETTINGS  
  17. prefs:root=MUSIC  
  18. prefs:root=MUSIC&path=EQ  
  19. prefs:root=MUSIC&path=VolumeLimit  
  20. prefs:root=General&path=Network  
  21. prefs:root=NIKE_PLUS_IPOD  
  22. prefs:root=NOTES  
  23. prefs:root=NOTIFICATIONS_ID  
  24. prefs:root=Phone  
  25. prefs:root=Photos  
  26. prefs:root=General&path=ManagedConfigurationList  
  27. prefs:root=General&path=Reset  
  28. prefs:root=Sounds&path=Ringtone  
  29. prefs:root=Safari  
  30. prefs:root=General&path=Assistant  
  31. prefs:root=Sounds  
  32. prefs:root=General&path=SOFTWARE_UPDATE_LINK  
  33. prefs:root=STORE  
  34. prefs:root=TWITTER  
  35. prefs:root=General&path=USAGE  
  36. prefs:root=VIDEO  
  37. prefs:root=General&path=Network/VPN  
  38. prefs:root=Wallpaper  
  39. prefs:root=WIFI  
  40. prefs:root=INTERNET_TETHERING  


使用方法: 

Objective-c代码  ios 界面跳转设置
  1. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Keyboard"]];  


然而不幸的是,ios 5.1之后系统不再支持这些url跳转调用到系统。 
引用
Yep, saw this (and many more), even implemented it in a test application. Really need to get the definative word from APPL, but the community concensus opinion is APPL disallowed it in 5.1 after it was publically "discovered/published", so applications containing it won't be accepted. 

08/01/12 Update: Asked Apple through my developer account if there is a way to programmatically launch the WiFi Settings dialog. Here is the response: 

"Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations." 


From:  http://*.com/questions/8246070/ios-launching-settings-restrictions-url-scheme  

所以,要么我们干脆干掉这个功能。要么,变态了。 
Objective-c代码  ios 界面跳转设置
  1. - (void) showLocationAlert {  
  2.   
  3.                 if ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorized) {  
  4.   
  5.                         //Check whether Settings page is openable (iOS 5.1 not allows Settings page to be opened via openURL:)  
  6.                         if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]]) {  
  7.                             UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:@"You must enable location service,Turn on location service to allow \"YourApp\" to determine your location" delegate:self cancelButtonTitle:@"Settings" otherButtonTitles:@"Cancel", nil];  
  8.                             [alert show];  
  9.   
  10.                         }  
  11.                         else {  
  12.                             UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:@"You must enable location service" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];  
  13.                             [alert show];  
  14.                         }  
  15.                  }  
  16.             }  
  17.   
  18.   
  19.   
  20.   - (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex  {  
  21.           if (buttonIndex == 0) {  
  22.                 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];  
  23.             }  
  24.   
  25.         }  


From:  http://*.com/questions/12398688/location-service-alert