-
Notifications
You must be signed in to change notification settings - Fork 158
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
isAirplaneEnabled always return true #37
Comments
Have you run the example ? It works fine in my iPhone 7 plus (iOS 11.3.1), how about your test device? |
Hi @c19354837 I does compile on the simulator but not on my test device, I have this error : EDIT : I'm on the latest XCode version I think (9.3.1) & my test device is an iPhone 5C (iOS 10.3.3) |
Some APIs may not work well in simulator, and you should test in the physical device. The error is React-Native's bug, see this PR I just change the code to: static NSString *RCTCacheKeyForImage(NSString *imageTag, CGSize size, CGFloat scale,
RCTResizeMode resizeMode, NSString *responseDate)
{
return [NSString stringWithFormat:@"%@|%g|%g|%g|%lld|%@",
imageTag, size.width, size.height, scale, (long long)resizeMode, responseDate];
} |
It's really strange. I'll try to find a iPhone with iOS 10. It may take some time.
|
Thanks for your quick answers 馃槃 |
I think I get it. I get airplane's status by: NSString * radio = [[CTTelephonyNetworkInfo alloc] init].currentRadioAccessTechnology;
bool isEnabled = radio == nil; and the Normally, if your device has no SIM, There is no official API which can get airplane mode directly. Here are some discussions. And
It's a bug in iOS 10, and it's normal in iOS 11 for some system limits. Next version will fix it. |
Hi @c19354837 Thanks a lot for your investigations ! I will find a device with a SIM card. |
Hello,
On iOS only ,
isAirplaneEnabled()
always return true.It works perfectly on Android. Maybe a config issue ?
Thanks 馃槃
The text was updated successfully, but these errors were encountered: