Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取蜂窝网络类型出错了,iOS12以上系统API更换了 #129

Closed
Abnerzj opened this issue May 13, 2020 · 17 comments
Closed

获取蜂窝网络类型出错了,iOS12以上系统API更换了 #129

Abnerzj opened this issue May 13, 2020 · 17 comments

Comments

@Abnerzj
Copy link

Abnerzj commented May 13, 2020

CTTelephonyNetworkInfo *teleInfo = [[CTTelephonyNetworkInfo alloc] init]; NSString *accessString = teleInfo.currentRadioAccessTechnology;

通过currentRadioAccessTechnology无法获取到,iOS12+需要通过serviceCurrentRadioAccessTechnology获取。

@dustturtle
Copy link
Owner

我在13.3的iphonePro真机的电信卡测试,currentRadioAccessTechnology是可以获取到的。不知道你是什么设备,什么系统?用的哪个运营商?

@dustturtle
Copy link
Owner

@Abnerzj

@Abnerzj
Copy link
Author

Abnerzj commented Jun 15, 2020

iPhone 11 iOS 13.5 中国联通

@dustturtle
Copy link
Owner

@Abnerzj 刚才修改了,试试master上最新代码是否ok,多谢

@Abnerzj
Copy link
Author

Abnerzj commented Jun 16, 2020

好的。我刚刚看到库的版本还是1.3.0,通过pod更新时,拉取到的代码还是会从本地缓存取。

@Abnerzj
Copy link
Author

Abnerzj commented Jun 16, 2020

@dustturtle

@dustturtle
Copy link
Owner

pod我没更新,你从master直接更新代码

@dustturtle
Copy link
Owner

@Abnerzj master的代码有问题吗

@Abnerzj
Copy link
Author

Abnerzj commented Oct 21, 2020

如果不更新podsepc的版本话,要从master拉取到你更新的最新代码的话,只是简单的清理本地的这个库还不行,需要做很多操作,很繁琐,建议提交新的podsepc版本,方便大家更新。

@dustturtle
Copy link
Owner

@Abnerzj 你的问题我无法复现,我没有验证过就更新提交新的podspec是不太合适的。。。

@dustturtle
Copy link
Owner

你手动替换RealReachability.m这个文件重新run下项目即可验证。。。

@dustturtle
Copy link
Owner

或者直接用我master里面的demo来验证也可以 @Abnerzj

@Abnerzj
Copy link
Author

Abnerzj commented Oct 27, 2020

我做了各种清理之后是可以从新获取到最新的代码,我这边没问题了。不过我的操作过程有些繁琐,不知道其他的小伙伴会不会跟我一样繁琐。

@dustturtle
Copy link
Owner

@Abnerzj 新代码能解决你的问题?老问题不再出现了?确认了我就发个pod版本哈

@Abnerzj
Copy link
Author

Abnerzj commented Nov 2, 2020

@Abnerzj 新代码能解决你的问题?老问题不再出现了?确认了我就发个pod版本哈

解决了

@XiFengLang
Copy link

@dustturtle 要不辛苦下发个pod版本吧,我这边有个私有库依赖了这个库,我单独给RealReachability再建个私有库的话,怕以后跟你的代码不同步,所以还是想麻烦你更新个pod版本。

@dustturtle
Copy link
Owner

已经更新了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants