Any way of knowing if bluetooth is on/off without triggering "allow app to access" bluetooth prompt on IOS 13+? - ios

I'm trying to design a flow where if the bluetooth is turned off, then display a specific page, or skip the page entirely of bluetooth is already on. However, I want to do this without triggering this popup on IOS 13+.
I am using IONIC 6 to build the IOS app and using diagnostic.isBluetoothAvailable() to do this. However, this asks bluetooth permissions if not requested.
Is this possible? Thanks bunch!

Related

How to detect launch app via MFi device on iPhone

Could someone tell me "How to detect launch app via MFi device on iPhone"?
Apple announced several major changes for a new Location Permission Flow on iOS 13.
(https://gimbal.com/ios-13-location-permissions/)
If want to get the GPS signal, the user need to select while in using or always.
And set up showsBackgroundLocationIndicator = YES, the app could get the GPS in the background.
It works well on the normal case(Launch with press the icon on the mobile screen).
But I figure out it could not receive the GPS if launch app via MFi device.
I also report it on the Apple bug report(https://feedbackassistant.apple.com/feedback/7537501)
I got a workaround but the first one is how to detect launch app via MFi device on iPhone.
By the way, I also check the argument of UIApplicationMain, but no use.
Please help or try to give some ideas about how to achieve this. Thanks!
Test Steps
1. First launch & user accept the location permission
2. Confirm the GPS could be used & check the setting page
3. Force close the app
4. Plug with the lighting and launch via MFi device
Answer my final solution.
I figure out if the app launch via the MFi device, the initial flow will enter applicationDidEnterBackground and not run to applicationDidBecomeActive. So, I just add a flag to record that and detect the EAAccessory status.
Share for who guys have a same problem. Hope this could be helped.
iOS 15 can use CLLocation's sourceInfo(CLLocationSourceInformation) to determine location information is from Xcode or MFI.

Cordova - IOS - Is there any way to open WIFI setting or Mobile Data settings directly?

English is my second language. I apologize.
I'm trying to develop an hybrid app and it needs wifi or mobile data enabled to work.
If none of them are enables a Pop-Up appears and gives the user 3 options, Wifi, Mobile Data or cancel.
On Android there's no problem. I can use cordova's diagnostic plugin and use switchToWifiSettings() or switchToMobileDataSettings()
But for IOS only switchToSettings() is available. Is there any way to go further and open WIFI settings or Mobile Data directly?
Thanks in advance.
The functionality was removed in iOS 5.1. There's no way to go further than that.

Bluetooth pairing in iOS: how to create custom pairing dialog?

When connecting to a device which uses a passkey pairing method in iOS, the OS brings up a pairing dialog if necessary. I have seen a couple of apps which use a custom dialog instead. I think they show that before connecting to the device, and then somehow use the passkey that was entered when connecting to the device to bypass the OS dialog.
How can I use a custom dialog for pairing?
Alternately, if I know the passkey (in code), how can I avoid showing a pairing dialog completely?
Thank you for the question, I did a really long research and sadly the pairing process is completely controlled by iOS. There is no parameter we could change.

Is there a way to prompt a user to turn on/off WiFi in iOS from an Alert?

I have this problem where when I go out my iPhone 6s on iOS 9.3.4 tries to connect to every hotspot I pass. Then when it is trying to connect I can't get emails/texts/alerts etc. My solution has been to turn off WiFi. But then I get home again and forget to turn it back on and I wonder why my internet is so slow until I remember to turn WiFi back on. I got the idea for an app to build a geofence around my house and turn off WiFi when I leave that area. I know I can't do this automatically because of the iOS sandboxing restriction, but can I pop an alert when I cross the geofence boarder that asks if I want to turn WiFi on/off?
I haven't found anything current that allows me to do this. I have searched extensively and only found "Stumbler" but it appears to be from 2007. I only know C# and do all my app development in Xamarin so C# code would be best or if you know of any libraries/components/plugins.
Also, I just want this app for myself so no need to submit to app store.
Thanks,

Is it possible to turn on/off notification from different applications on ios

I am working on an application that will allow the user to turn off cellular data or at least turn off notifications from other applications on the device, all through my application. Is this possible? (I know that in Android it possible)
Your app has absolutely no control what-so-ever of other apps, not even indirectly. The one exception is using a custom url scheme to open the app, and optionally, ask it to do something.
No, on iOS you can't even find what other apps the user has installed.
Even if you could, they are all sandboxed. You can't touch anything inside the other apps.

Resources