Accessing wifi info with RSSI in iOS - ios

I am well aware that Apple has not exposed any api's to fetch nearby WiFi access-points and display them as a list for the user to choose with the RSSI signal strength.
There are several hidden and private api's available which does help in finding the WiFi Hotspots nearby the iPhone , but I read that if we use them our app will be outright rejected from Apple Appstore.
NEHotSpotHelper from NetworkExtension framework also will not fit to my use case.
So I was wondering how it is implemented when I came across the Qardio Scale app in appstore which helps the user to identify and fetch nearby wifi hotspots and allows the user to choose one so that the qardio scale can connect into.

Related

If my iOS app pairs with a device using Core Bluetooth, will other apps have access to the device?

From Android documentation:
Caution: When a user pairs their device with another device using BLE, the data that's communicated between the two devices is accessible to all apps on the user's device.
For this reason, if your app captures sensitive data, you should implement app-layer security to protect the privacy of that data.
Is this also true for iOS? I haven't found anything on it and I assumed because iOS doesn't show the true MAC addresses of devices this wouldn't be an issue, but just wanted to check. Thanks
Yes, iOS also works in a similar way. And if you want private communication, you also need to maintain app layer security. Thus android wear, galaxy watch, and other similar devices use encrypted communication in the app layer.
If you already know the details. BLE communication works via Gatt Characteristics.
Consider there are two health applications running on an iOS device and the user also using an activity tracker device. In that case if the user wants to connect both of the health apps with that tracker, he certainly can do it. Both apps will be able to communicate with the activity tracker and get sensor data using the CBCentral module. Look at the diagram for Details.
On the other hand, In general, vice versa will not possible. Because if both iOS apps use Peripheral Role they will register two different instances of BLE-Service even if using the same UUID. Thus it will force two apps to communicate with completely different characteristics instances. However, it is also possible to work with two peripheral apps with the same UUID but this is not what the BLE developers ever wanted.
you need to provide app level security based on Service UUID, so that devices having the app with only same service UUID can connect.

Custom BLE Advertisement on iOS

I'm hoping to create a BLE advertisement on iOS where I can control the advertisement on a byte level.
One use case would be to mimic an iBeacon advertisement. What is the iBeacon Bluetooth Profile (I want to advertise while my app is in the background which is why I'm not using CoreLocation)
I do not see a way to do this with the Core Bluetooth API. Is this correct? Are there alternatives using private API's or jailbreaking?
As the others already pointed out, there is no API on iOS that allows you to do this.
You can advertise as an iBeacon, but only when your app is in the foreground. When in background, the advertisement is removed and therefore cannot be discovered anymore (except for other iOS devices which explicitly scan for that service UUID). Also see the documentation here: Core Bluetooth Background Processing
If you would share your use case and what you want to achieve, maybe there are other ways to realise it.
My experience with iOS is that if it is something is not exposed in the API, there is no way around, except jailbreaking. For Bluetooth low energy the API is at GAP/GATT level, and very little at the lower levels (if anything) is exposed. Advertising is a LL (link layer) feature.
To illustrate how restricted the access is: When scanning for BLE devices you will not have access to the advertiser's MAC address iOS. In Android you have it.
I do not see a way to do this with the Core Bluetooth API. Is this
correct?
Since you have to set Manufacture Specific Data in order to achieve this, if nothing has changed you will experience exactly the same issue that I did. Explained here:
The advertisement key 'Manufacturer Data' is not allowed in CoreBluetooth
It is not possible.

Proximity based actions based on Wi-Fi signal

Does iOS support proximity based actions when detecting a specific Wi-Fi signal?
E.g. similarly to what happens with iBeacons is it possible to detect entering a Wi-Fi region?
I have found this article on Wi-Fi Aware which is interesting:
http://www.wi-fi.org/beacon/rolf-de-vegt/wi-fi-aware-a-platform-for-proximity-based-wi-fi-innovation
Unfortunately, iOS does not provide third party apps access to visible WiFi networks.
There are private APIs that some apps use to detect the name of the currently connected WiFi network, but that is of limited use because a user will not connect to every WiFi network when moving around. The CoreLocation component of the operating system itself does use visible WiFi networks to help infer it's latitude and longitude, but the mechanism is internal, closed source and not exposed to the user.

About wifi scanning in iOS

I'm wondering if it's possible to scan wifi networking nearby like what WiFi Map did?
And in this application, it can even provide password of the wifi hotspot. Is it legal and what kind of technology is used?
I do not think this App use IOS technology to scan wifi and offer dynamic password.
In IOS,with public API,you even cannot scan available wifi nearby.
So,I think the Technology of this app is:
At first, they offer some public wifi and passowrd.
Then user use this app,and they choose to share about connected wifi.So,that the database of this app became bigger and bigger.

What exactly is the 'proximity profile' with respect to the Bluetooth Low-Energy APIs?

I am currently developing an iOS app for a BLE device which will implement the Proximity Profile (which I currently don't have access to yet), but I am at a loss as to what that actually means.
I have read the pdf document from bluetooth, and know that the BLE device would be the proximity reporter and the application the proximity monitor, but what does that mean in terms of the CoreBluetooth framework?
After connecting to a BLE device, the method I am currently using to measure proximity is through calls to readRSSI on the peripheral device. Does a device which implements the proximity profile behave differently so that I don't need to make that call? There isn't much documentation around to give a better idea.
Here is a description of the GATT services related to the proximity profile: http://developer.bluetooth.org/gatt/profiles/Pages/ProfileViewer.aspx?u=org.bluetooth.profile.proximity.xml
It looks like it allows for an attribute to read the RSSI from (I think normally you can read that value from a lower level method directly from the transmitter/receiver). So you should be able to read the RSSI value on both ends of the connection.
The profile also allows for alerts to happen on both ends and you can control what level of alert occurs.
I think essentially, a "profile" is just a collection of attributes in GATT. If you have the required attributes you can state that you support that particular profile.
Here's a PDF with the little details if you want: https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239392

Resources