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

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.

Related

What is needed for my hardware to connect via WAC

I am developing a homekit bridge that I would like to connect to WiFi without the user having to enter it's credentials. So after googling and asking another question here, I found that I can use the EAWiFiUnconfiguredAccessoryBrowser class to share WiFi settings, but I could not find any documentation about what my hardware should implement in order to be picked up by that class. Any direction or suggestion that does not involve EAWiFiUnconfiguredAccessoryBrowser is welcome

How to select specific network interface for NSURLSession connections?

I’m not talking about Reachability.
What I’m talking about is figuring out how to create a network connection from an iOS device across the cellular interface.
Why? Because I have conditions where the device connects to a WiFi access point so it chooses WiFi… but that access point is not internet connected and goes nowhere. I have data which I must make every effort to deliver and it some cases it’s getting lost in the WiFi gateway to purgatory. In both cases of using Reachability and relying on MPTCP, Apple has already given priority to WiFi in the stack.
I know NSURLSessionConfiguration can set allowsCellularAccess to allow cellular access — I’m looking to require cellular for the routing.
Even at the CFNetwork level I’m looking at kCFStreamPropertyConnectionIsCellular for status, kCFStreamPropertyNoCellular to disable cellular.
I can’t find anyway to give preference to the cellular radio. I realize Apple has gone to great lengths to prefer WiFi and I’m going against that — which is why I’m having such difficulty finding an answer to this.
I'd like to keep this up in the Cocoa level, but not opposed to going into Foundation or deeper levels. I would like to avoid trying to parse an interface table (if it's even accessible) to figure out which is the cellular interface.
Has anyone successfully created a network connection across the cellular link despite WiFi appearing to be present?
Is some configuration of Multipath TCP the answer here?
To bind to a particular interface, as far as I'm aware, you'd have to drop all the way down to the raw socket level, and there's no way to provide a custom socket for NSURLSession purposes, so you'd basically be rewriting it from scratch. You should file a bug asking for support for binding an NSURLSession to a source IP.
The behavior you're experiencing is a known problem with iOS and disconnected networks. iOS 9 and later do a better job, but even then, they can be highly problematic; the devices sometimes refuse to talk to the Wi-Fi network, and sometimes refuse to talk to the cellular network. Specifically, it seems to fail spectacularly if either signal is weak. Just this morning, I actually had to force my iPhone (iOS 10) to talk to a disconnected Wi-Fi network by putting it in Airplane mode and enabling only Wi-Fi.
I'm told that you can fix this by configuring the network's DHCP server to not provide a router advertisement; that said, every time I've tried that, the iOS device would just keep asking for an offer repeatedly. Maybe that bug got fixed at some point. If so, it might be worth a shot, but don't expect it to work in older versions of iOS.
Failing that, assuming you don't need to support web browsers in iOS 3 and earlier, you might try eliminating the DHCP server on that Wi-Fi network entirely, and just rely on DNS service discovery with zero-conf IPs. That way, the device won't see a router, and it won't try to send data out that interface except to those link-local IPs.
If that isn't possible for some reason, ordinarily I would suggest using a customized copy of libcurl, except that I doubt this will work in your case, because POSIX networking doesn't wake the cellular hardware.
In iOS 12 and later you can use the Network Framework. Sample code is here.

Does the Sony qx10 api support multiple simultaneous clients?

Apologies in advance for the general-ness of the question.
I'm writing a multiple client iOS app for viewing the video feed from a single camera. Can the QX10 api support two (or 3) iPad's discovering/viewing the same QX10 at the same time?
I've been looking QX10 sample code, the camera api docs, StackOverflow, and of course the dev website and haven't seen an answer. I'd just buy the bloody thing to test with, but there are none nearby and I was hoping to avoid having to mail order/return it if it didn't work.
....And we're not locked into HW. If there's a better option, I'm open....
I don't believe it does. For ios, the camera creates a network that the ios connects to. (In ios settings/wireless) Any further attempts to connect to the camera from another device fail. Since the API only works after a network connection is established, I don't see how the API could possibly allow 2 devices could connect at once.
(No extraneous words in this post b/c that will get edited which auto down votes the question.....ahhh internet)
I did not try it, but you could use a computer with nat. For example an openrwt router to open up multiple wifi interfaces, one to connect to the camera, using the 10.0.0.0 network the camera uses and then an other network to connect your clients with NAT.
The question would be when the API would start to get confused.
So depending on what you want, maybe some mapper on that helper-computer could
do some proxying of information.
So in theory with an external box, maybe, but as Oldmicah said, it seems that only
one device can connect at the time (at least my QX100 also behaves like that). :(

Programmatically connect or detect to a certain WiFi in 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

Using CaptiveNetwork to authenticate wifi network

I am trying to use the CaptiveNetwork api to have my app authenticate with known wifi networks. I am able to register my app with CNSetSupportedSSIDs, which prevents the os from displaying a web sheet. However, there is little documentation, indeed little information anywhere, it seems, on how my app is notified once a connection is established to a registered network. Perhaps I am missing something?
If anyone has any advice on where to look, or knows of apps that perform wifi authentication, so I can examine their use-case, or spots something that I've obviously missed, do let me know.
Thanks.

Resources