You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/06/15 08:44:51 UTC

[GitHub] [cordova-plugin-network-information] ZumelzuR commented on pull request #130: 5g feature

ZumelzuR commented on PR #130:
URL: https://github.com/apache/cordova-plugin-network-information/pull/130#issuecomment-1156178064

   > @ZumelzuR On my iPhone 13 Pro `networkInfo.currentRadioAccessTechnology` is always nil. Strange enough another phone (with the same os version) this pointer is not nil. I found `networkInfo.currentRadioAccessTechnology` is deprecated and can be nil on ios >= 14.2. I`ve found this fix https://github.com/Tencent/Hippy/pull/1597/files. May you can try this and add this to your PR.
   > 
   > _Edit_: May you will use a more reactive form (with a nil check):
   > 
   > ```objc
   > static NSString *radioAccessNameIn(CTTelephonyNetworkInfo *networkInfo) {
   >   if (@available(iOS 13.0, *)) {
   >     if (networkInfo.currentRadioAccessTechnology == nil && networkInfo.dataServiceIdentifier) {
   >         return [networkInfo.serviceCurrentRadioAccessTechnology objectForKey:networkInfo.dataServiceIdentifier]; 
   >     }
   >   }
   >   return networkInfo.currentRadioAccessTechnology;
   > }
   > ```
   
   Thank you, ok yes I will do some testing on my devices and come back  with the fix and an update. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org