iOS 10 跳轉系統設定

來源:互聯網
上載者:User

標籤:settings   方法   lin   bsp   ios   default   行修改   self   nsurl   

  苦心人天不負, 為了項目終於把 iOS 10 跳轉系統設定的方法給搞定了, 很欣慰.

  http://www.cnblogs.com/lurenq/p/6189580.html

  iOS 10 跳轉系統設定的欄位

  • 電池電量 Prefs:root=BATTERY_USAGE
  • 通用設定 Prefs:root=General
  • 儲存空間 Prefs:root=General&path=STORAGE_ICLOUD_USAGE/DEVICE_STORAGE
  • 蜂窩資料 Prefs:root=MOBILE_DATA_SETTINGS_ID
  • Wi-Fi 設定 Prefs:root=WIFI
  • 藍芽設定 Prefs:root=Bluetooth
  • 定位設定 Prefs:root=Privacy&path=LOCATION
  • 協助工具功能 Prefs:root=General&path=ACCESSIBILITY
  • 關於手機 Prefs:root=General&path=About
  • 鍵盤設定 Prefs:root=General&path=Keyboard
  • 顯示設定 Prefs:root=DISPLAY
  • 聲音設定 Prefs:root=Sounds
  • App Store 設定 Prefs:root=STORE
  • 牆紙設定 Prefs:root=Wallpaper
  • 開啟電話 Mobilephone://
  • 世界時鐘 Clock-worldclock://
  • 鬧鐘 Clock-alarm://
  • 秒錶 Clock-stopwatch://
  • 倒計時 Clock-timer://
  • 開啟相簿 Photos://

- (void)encryptMethodGoToSettingWiFi {

    NSString *encryptWork = [self encryptDefaultWork];

    NSString *encryptWiFi_Method = [self getGoToWIFI_Method];

    NSURL*url = [NSURL URLWithString:@"Prefs:root=WIFI"]; 

    Class LSApplicationWorkspace = NSClassFromString(@"LSApplicationWorkspace");

    [[LSApplicationWorkspace performSelector:NSSelectorFromString(encryptWork)]

                             performSelector:NSSelectorFromString(encryptWiFi_Method)

                             withObject:url

                             withObject:nil];

}

 

// 利用ASCII值進行拼裝組合方法。這樣可繞過審核, 這麼寫也有弊端,如果蘋果的未公開方法一旦修改。我們必須重新進行修改

-(NSString *)encryptDefaultWork{

    NSData *data_encrypted = [NSData dataWithBytes:(unsigned char []){0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x57,0x6f,0x72,0x6b,0x73,0x70,0x61,0x63,0x65} length:16];

    NSString *method = [[NSString alloc] initWithData:data_encrypted encoding:NSASCIIStringEncoding];

    return method;

}

 

-(NSString *)getGoToWIFI_Method{

    

    NSData *data_encrypted_one = [NSData dataWithBytes:(unsigned char []){0x6f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x6e, 0x73, 0x69,0x74, 0x69,0x76,0x65,0x55,0x52,0x4c} length:16];

    NSString *key_encrypted_one = [[NSString alloc] initWithData:data_encrypted_one

                                                    encoding:NSASCIIStringEncoding];

    NSData *data_encrypted_Two = [NSData dataWithBytes:(unsigned char []){0x77,0x69,0x74,0x68,0x4f,0x70,0x74,0x69,0x6f,0x6e,0x73} length:11];

    NSString *key_encrypted_two = [[NSString alloc] initWithData:data_encrypted_Two

                                                    encoding:NSASCIIStringEncoding];

    NSString *method = [NSString stringWithFormat:@"%@%@%@%@",key_encrypted_one,@":",key_encrypted_two,@":"];

    return method;

}

 

iOS 10 跳轉系統設定

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.