Closed msudol closed 3 years ago
got my own newer iPhone (SE) with iOS 13.7 - unable to get the Wifi RSSI.
Any chance for any update to be iOS 13.x compatible. Can compensate for time of course.
I'll fire up the simulator and see if anything looks broken. Are you getting any errors in JS or Swift console?
I'm seeing this error:
Error in Success callbackId: RSSI873033665 : TypeError: null is not an object (evaluating 'messageParts[0].toString')
My function is similar to this:
wifi.read(function (info) {
console.log(info)
}, function (err) {
console.error(err);
});
But wifi.read is running the first part, and not throwing an err.
Here is the object I'm getting:
bars: null
isIPhoneX: true
rssi: null
The devices are iPhone 11, and iPhone SE... maybe because the plugin thinks it's iPhoneX?
I recall there being a problem with being able to obtain RSSI on iPhoneX... we handle that exception at https://github.com/emcniece/cordova-plugin-rssi/blob/master/src/ios/RSSI.swift#L98. It's troubling to hear that this may be a problem for newer devices as well.
The messageParts
error looks like the message builder is having problems, potentially because newer devices have the iPhoneX problem but aren't filtered.
Currently spinning simulators to try and replicate 🐛
The plot thickens:
2020-09-08 21:58:48.632781-0700 RSSI Demo[7677:25356790] *** Assertion failure in -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:], /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.102/UIApplication.m:5385 cordova-plugin-rssi: getXWifiBars exception: App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.
Interesting that this was caught on an iPhone11 simulator. Together with your report of this now happening on an SE I'd guess that iOS is upgrading the UI for existing devices, and now we're seeing what was once the X problem on these other platforms.
This appears to be working, can it be pushed to release and NPM?
Yep! Tagged as 1.2.0 and published to https://www.npmjs.com/package/cordova-plugin-rssi.
Looks like the PR merge auto-closed this issue... feel free to reopen if there are more problems.
Seems like on an iPhone 11, iOS 13.x I believe - getting full details from the user - it appears that RSSI is unavailable. Don't have an iPhone 11 with iOS 13.x to test on at the moment, could be user error and will try to rule that out, but just creating a ticket to check in on the project.