Android19連接iOS13個人熱點失敗


本文鏈接:https://www.cnblogs.com/obarong/p/11770028.html

現象

第一次連上,Android設備可以上網,分配到的IP是172.20.10.X。Android連上其他Wi-Fi,再連iOS13.1個人熱點,分配到的IP是剛才連其他Wi-Fi時的IP。估計是iOS沒有分配新的IP。

目的

修復連接問題。如果無法修復,則彈出提示框,引導用戶用其他連接方式。

過程

查看Android設備IP

Android設備用USB連電腦,執行adb shell netcfg,wlan0是Android設備的IP。

iOS13.2也不行,只能做彈窗警告。

- (void)checkios13 {
    if (@available(iOS 13.0, *)) {
        [self showAlert];
    }
}

- (void)showAlert {
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"str_alertTitle_info", nil)
                                                             message:NSLocalizedString(@"str_not_support_connect_ios13_ap", nil)
                                                      preferredStyle:UIAlertControllerStyleAlert];
    
    UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"str_alertOKButton_title", nil)
                                                            style:UIAlertActionStyleDefault
                                                          handler:nil];
    [alert addAction:defaultAction];
    [self presentViewController:alert animated:YES completion:nil];
}

結果

成功……告訴用戶“暫不支持連接iOS13個人熱點”。

臨時解決辦法:手動設置 IP 為 172.20.10.x,x 從 2~15 中取一個。子網掩碼 255.255.255.240,或者網絡前綴長度 28。默認網關 172.20.10.1。dns 可以用 114.114.114.114, 8.8.4.4。

附錄

Xcode運行報錯

Could not locate device support files.

Xcode11.1版本太低,iOS13.2版本太高,不能運行。

解:
下載beta版Xcode11.2或者下載13.2的SDK放到路徑/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

sdk下載鏈接: https://pan.baidu.com/s/1lnPDGSdUmEdk3Y5b0_4z7g 提取碼: hirw

可能要重啟Xcode。

參考

Beta Software - Download - Apple Developer
https://developer.apple.com/download/

iOS & iPadOS 13.2 Release Notes | Apple Developer Documentation
https://developer.apple.com/documentation/ios_ipados_release_notes/ios_ipados_13_2_release_notes?language=objc

Xcode真機調試報錯:Could not locate device support files. - 簡書
https://www.jianshu.com/p/38931f09ca0f

升級到IOS13有BUG 連接個人熱點沒有網絡【iphone吧】_百度貼吧
http://tieba.baidu.com/p/6265197210


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM