iPad still connecting to Game Center Sandbox in airplane mode - ios

This seems weird, but the iPad I have is still successfully connecting to the Game Center Sandbox even though airplane mode is on. It would seem when debugging iPad the device somehow connects thru USB to internet (is this the case?)
I'm just trying to test the case where there is no internet connection and make sure there is a graceful fail.
Anyway, how do I disable internet connectivity on the iPad device then?

If you're logged into Game Center on the device, then apparently the GC login request will always appear to work immediately and it will say Welcome back, PLAYERNAME *** Sandbox ***. I think it must be echoing the last known GC server IPs. That doesn't mean you can reach the GC servers though.

Related

iPhone disconnected USB connection overnight and there are no system logs

I needed to run a long test to see what's making my app crash. So I set the Mac to not sleep and I ran the app on the iPhone connected via USB overnight. In the morning, I found that the iPhone had disconnected during the night.
I looked for in Console and Xcode for device logs and I found there were none at all on the phone, therefore no history of what happened during the night. Logs began after the moment I reconnected the phone to the Mac.
I downloaded the app container and found no useful evidence of what happened.
iOS is 12.4 and Xcode is 10.3.
What can be done to ensure there is some evidence of what caused the crash? Other than filling the app with fprintf's going to a custom log file. Also I am using Fabric.
Do the same thing again, but this time with a camera looking at the PC. Maybe you can grab some evidence from the recording next day. Modern solutions for modern problems.
Go to Settings -> Touch ID and Passcode
Check if USB Accessories has been turned off. Your device may have disconnected then failed to reconnect due to this feature restricting access to the device if it is disconnected for more than an hour.
Change this setting, replace your cable or use a different USB port then try running it again.

iPad force connection to WiFi WITHOUT Internet

I'm working on an embedded device that will communicate with (WiFi-only) iPads over WiFi. However, these devices are not connected to the internet. They are simply connecting to a specific port, which is constantly relaying certain information. The iPad connects to the Access Point, receives an IP Address from DHCP, and can now reach the desired
What I'm seeing is frequent disconnects, or interruptions in the connection.
My suspicion is that iPad's inability to connect to captive.apple.com/library/test/success.html is causing it to either re-scan for WiFi networks or in some other way momentarily disrupt the connection.
Is there a way to disable this behavior, or ensure that an iPad remains connected to the intended WiFi, even in the absence of an Internet connection? Either through a setting on the iPad, or a configuration setting on the embedded router/Access Point?
If you don't mind breaking backwards compatibility with older iOS devices (iOS 3, for example), I'm told (by someone in DTS, IIRC) that you can send a DHCP advertisement without a router advertisement field, and iOS will do the right thing. I have not tried this personally, though.
You might also try using the CaptiveNetwork framework (deprecated in iOS 9 with no replacement) to claim control over the SSID, and the just never report success or failure. I'm not sure if that would work or not, but it is worth a shot.

iOS 8.2 UIRequiresPersistentWiFi not working

I am making an app that requires consistent wifi connection. The problem is that when the wifi is off and I turn on the app nothing happens, even though I have activated the UIRequiresPersistentWiFi flag. Also when the screen locks, and I go to the app after unlocking, it also can't use the wifi. The only solution that I have found for this problem is the activation of UIRequiresPersistentWiFi, which clearly doesn't work in my app, or I am not doing it right. So does anyone have any idea what could be wrong?
UIRequiresPersistentWiFi doesn't force the device to connect to WiFi when the app is launched, it only specifies that an existing WiFi connection should be kept open for the duration your app is running. The default behaviour is for iOS to drop its WiFi connection after 30 minutes to conserve battery life.
See the documentation for more detail.

CoreBluetooth and Wifi interference

I'm really stuck with a problem, thus, needless to say, I need your help.
I'm using CoreBluetooth to communicate between two iDevices, it is the same app, running as a central on one device and as a peripheral on the other device. In some cases the central loses connection to the peripheral with the following error:
Error Domain=CBErrorDomain Code=10 "The connection has failed unexpectedly." UserInfo=0x14ee8fe0 {NSLocalizedDescription=The connection has failed unexpectedly.}
In this particular case, the peripheral was an iPad 4 and the central was an iPad mini.
I tracked down the problem and it turns out, that once I encounter this issue, the problem will persist every time I connect, regardless of restarting the app or even the bluetooth on both sides, HOWEVER, the interesting part is, if I turn off Wifi on the central device, the connection doesn't time out anymore.
Do you have any suggestions, workarounds? Both devices are running iOS 7.1.1
This is a well known issue, and it has a solution that is confirmed to work for the Mac side.
sudo defaults write /Library/Preferences/com.apple.airport.bt.plist bluetoothCoexMgmt Hybrid
After you run this script, the issue will go away and BT connections will remain stable.
And here is the explanation:
Background: after a lot of snooping and head scratching, here's what I found: the issue here seems to be that the system isn't using the same Bluetooth/Airport coexistance mode for BLE as it uses for BT Classic. One tell tale sign: if you have any BT Classic devices connected and active, the bug won't repro (neither for the Classic device nor any connected BLE device). The moment the Classic device disconnects, the bug repros (ie all the BLE connections are also dropped).
Further, I was able to find reference in the symbol table of an airport configd agent to an override setting for the coexistance mode. If you set the mode manually as above to 'hybrid' (the same mode that is usually invoked when a classic device is connected), the bug no longer repros.
All credits go to William Henderson from Knock for this trick.
There were cases when the same effect was perceived on iOS devices as well. This some times happens when the Core Bluetooth connections are not stable. Sometimes this can lead to the WiFi connection being unusable. But it's hard to reproduce, at least I wasn't able to, and your question does not concern it either.

how to connect an ios device to a Hotspot driven by hostapd

I met a problem to connect an ios device to the hotspot driven by hostapd which runs on my arm board.
IOS device will take a long time to connect, at last, the wifi signal is shown on status bar, and also got the ip address, but the circle, by the ssid side, won't disappear, it always turns round. This will make user think that the wifi doesn't connected yet, but it really connected.
I have tried some devices to connect the hotsopt, such as android cell phones, windows laptop, they all work correctly.
PS. My English is not good, I hope you could understand what I mean.
if the "circle by the ssid side" keeps showing ,i think your device is still trying to get ip address.
could you please provide us with more detail messages? such as your hostapd configure file and your dhcpd configure file.

Resources