android连接ios热点超时,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。

20191031111137519833.png

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.

20191031111137799112.png

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

20191031111138433837.png

可能要重启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

原文:https://www.cnblogs.com/obarong/p/11770028.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值