Programmatically connect or detect to a certain WiFi in iOS? - ios

In advance I am sorry for my English.
The task consists in defining, whether there is a person in a certain place (at certain office, for example), and to activate depending on it certain possibilities of the appendix.
At first I thought of definition of information on WiFi (or check of the same SSID, or automatic connection to the hidden network with set in the SSID appendix and the password), but, seemingly, not to make it without jailbreak (if somebody knows how - please, answer).
I think, GPS - not the best exit as it is possible to be out of the room, using it.
By the way, I already saw apps determining by WiFi of a point of access so it can be made somehow. I guess.
Actually, question. How it is better to define in the application, whether there is a device within, for example, premises of office?

Basically, if you know location coordinates you can safely use CoreLocation framework. Whether your target device supports region monitoring it will be perfect. It uses not only GPS, but WiFi and GSM as well
Look here: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html
If you really need to get network name you can play with CNCopyCurrentNetworkInfo function of CaptiveNetwork framework.
See:
https://developer.apple.com/library/ios/documentation/SystemConfiguration/Reference/CaptiveNetworkRef/Reference/reference.html

Related

How to get a list of wifi connections around me with its RSSI strength using Swift?

My app should scan Wifi signals around and list the network's name and its RSSI.
I can't find any clue on Google about how to do it. Could someone give an example or at least point somewhere else where I can find the answer?
I dont think its possible ! It doesnt matter if its Swift or Objective-C nor C++, the basic principle of iOS is that only system can connect to WiFi or turn on off those system setting. All you can get is info about the currently connected network. App sandbox in ios limits all other possibility.
It is only possible to get the SSID of the network that you are currently connected to.

Bluetooth Smart: is it sensible to choose a device based on its peripheral name

I have an application (Basically an Arduino) that I connect to from iOS (and might use Android in the future as well) using BLE. I reprogram the BLE hosts to a specific value so that the when I ask the peripherals name after it gets discovered in iOS can be accepted or rejected.
I'm however not sure that this is a good way to do. The name has a code that users can easily change to an other (always valid) code. That way if two modules are up and running at the same time, users will be sure that only the module they are linked to is the one they want to be linked to. This is a bit the same like connecting a mouse / keyboard of course using 'normal' bluetooth.

Is wifi helps for geolocation coordinates even without connect any access points

I wonder if any device has open it's wifi without connect any access point and is it give some data info for geolocation?
Is the question about positioning with WiFi hot-spots ? Basically its described pretty well in: http://en.wikipedia.org/wiki/Wi-Fi_positioning_system
So basically in it, to be ale to determine the location, you must know the positions of the WiFi hotspots beforehand, or at least have a service which has list of hotspots and which could give you the location for the WiFi's you can see.
You don't need to make any connection to the WiFi hotspots, but you simply use the identification they are giving, and passing that information to the part which is determining the position.
In general, you would need to see whether you can find a service you could use from your selected platform, or whether the platform has APIs for using the technology.
In general positioning APIs might use the WiFi information on their cell-based positioning, and on those cases, you wouldn't really need to know anything about the WiFi things in your app.

Reachability - Check if valid with connection on public Wi-Fi

I am currently using an adapted reachabilty framework based on Apple's sample code.
The framework works fine, however it provides false postives.
If the user is attached to a wifi network where they are required to login before having a valid connection, the framework shows as an active connection when in fact it isn't.
An example of this is Starbucks' wifi where you must provide an email address before you get online.
Is there a way around this without pinging a certain address?
Currently I am using the reachabilityWithHostname function
Thanks
Daniel
Update as provided by the link below i see this is a limitation of the framework. Are others finding away to alert the user of this?
If your computer is connected to a Wi-Fi access point, but that access point's internet connection is down, reachability will tell you that yes, you have a network connection
Check out this link
Networking is playing an ever more important role in application
development, and Apple's reachability API is a valuable tool in making
network-centric apps play nicely with varying real-world conditions.
Today I'm going to give an overview of the reachability API, what it
does, and how to use it.
This should help you.

How to check if another iPhone using the same program is in your vicinity?

I've been googling this problem, but haven't gotten the wording right.
Basically I'm looking for an API, or some seeds of guidance in how I would go about writing a program where you get push notified if someone is in the same area as you based on GPS coordinates. In short: a realtime 4square not based on checking-in but based on GPS.
Part of me feels like this is something Apple may frown upon, but if the user is notified and making the decision to run the app, perhaps not.
Thanks in advance.
You're looking for the Bluetooth Bonjour type notifications found in GameKit. This has nothing to do with GPS and is instead based of short range radio (Bluetooth) which advertises itself using a zero conf protocol. The APIs basically give you the ability to broadcast your service (eg. "MyGame") over bluetooth and listen for others potentially broadcasting the same service.
If you're talking about geographic vicinity, you'll need to set up a central server where each device can register its location, and which will provide locations of nearby devices. A service like FourSquare does exactly this kind of thing.
Another way to look at 'vicinity' is network vicinity. You could have each device advertise itself via Bonjour and look for other devices doing the same.

Resources