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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to