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

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,

Related

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

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!

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.

Bluetooth Low Energy Emulate Keypress

I am playing around with a TI CC2541 chip, and was wondering if it is possible to send a "keypress" over BLE. This would be similar to the new Muku Shutter for iOS and Android, because I am trying to figure out a way to interface with a mobile device without installing a 3rd party application. Essentially, I would press the button on the CC2541 chip, and then it would emulate a keypress of volume up?
I have been researching for a while now, and all solutions to handle this have included writing a 3rd party application to map the commands in the BLE packet to a system command.
Any help would greatly be appreciated. Thank you!
On iOS the answer is no
Edit:
Exception: You might be able to set up your BT chip as a Bluetooth keyboard.
You could certainly write an app that talks with a remote BLE device and uses an agreed-upon protocol to pass key presses to your app, and then you could interpret those messages using code in your app.
However, Apple enforces a "sandbox" on its apps, and apps are not allowed to interact directly with the system except through very tightly controlled set of APIs. If there is not an official interfere to do something, it is not allowed.
If you were to run on a jailbroken device then the answer would likely be different. I can't help you there however.
Edit:
#OliverMason says in a comment that iOS shutter buttons are apparently single-key BlueTooth keyboards that emulate the volume up button, which the camera app recognizes as a way to trigger a photo. Thus my answer above isn't quite accurate.

Device Notification or value change, find it in other device

I'm developing some application which should notify my current device values into other devices within certain area. Let say i'm having app, the same app installed in other 3 devices. When i change something in my device, that should be notified in other device. Like, i'm selecting one button, that button selection should be on other 3 devices too.
Is it possible to do without web service and is there any specific frameworks there in iOS to do this task. Its kind of bluetooth searching devices within the area. It should be within the room, without any internet or wifi something.
Can anyone help me to find the solution.
Thanks,

How can I setup peer-to-peer connections without using GKPeerPickerController?

I want people to be able to start my iOS app on their device, and anyone nearby running my app (probably bluetooth only for now) would automatically connect with each other. I've read about and used GKPeerPickerController, but I don't want the user to have to think about which device they want to connect with.
I'm just not understanding how to handle the connectivity without using GKPeerPickerController.
I am targeting iOS 5.0 with this app. Thanks!
This page goes into more detail on how this is possible, although the focus is more on using just bluetooth: http://www.iphonedevsdk.com/forum/iphone-sdk-development/40710-gamekit-api.html

Resources