Ipod /iPad disconnect on screen lock

If your iPod or iPad is disconnecting when the screen locks, it might be because the  wifi is being turned off.  Please try the following steps and see if it helps:







I came accross this issue all over the net, with no real solution. So I did some testing and this is what I found.


(An update to iOS 6 was released today..unfortunately that still didn’t fix the problem..for me anyway).


From what I understand:


This new ‘feature’ of iOS6 dissables the wifi radio when an iOS device has been in sleep for abit, but it also somehow turns the iOS device’s wifi radio back on when it needs to (i.e. when a push email/ notification/ imessage is coming through) even when the device is in sleep. This is when the feature works. But there is a buggy loophole that arrises which causes the wifi radio to not automatically ‘re-engage’ when it should.


If you find that you only get emails/notificaitons and imessages when you wake up your ios device, and not as they come in, it’s because, at some point, you have done a series of actions that result in the wireless radio not knowing how to turn itself on when in sleep.


This is how you fix it


1) Turn wifi on (doesn’t matter if you connect to a wifi network now or later, but the wifi toggle must be on). If your ios device supports mobile data, turn it off for now.


2) Turn off the device (by keeping the sleep button pressed and then swiping)


Wait 30s


3) Turn it on

4) After the home screen loads, reset it (hold the home and sleep buttons down and keep holding until you see the apple logo)


That’s it.


Now, when your device is in sleep, the wifi radio will re-engage when it needs to.


People with 3G always on won’t experience this problem because when an iPad/ iPhone is in sleep (and hence, the wifi radio is turned off), having the mobile/cellular data on somehow wakes up the wifi radio if messages and stuff are coming in.


(I believe in Apple. It would be just plain stupid to introduce a feature that completely dissables wifi when in sleep, just to save battery..this isn’t the feature people, this is a bug of an actually great feature. Attempting to save battery life by only having the wireless radio turn itself off when in sleep (and not having it turn itself back on when it needs to) is creating a problem in the attempts to get rid of a reduced battery life problem. Have some faith in apple! Haha. This is not going backwards..this is going forward, with style…and a bug.)




Below are the series of actions (if you’re curious) that you have done at some point in time that have caused the wifi radio to forget to reengage when in sleep: (so there’s a set of actions to induce the bug, and to hide it)


Turn wifi off

Turn off device

Turn on device

Reset device

Turn on wifi


Now you won’t get push emails and stuff when your device is sleeping.

Apple has changed from SSL to TLS

A day or two ago, Apple silently  forced TLS only on gateway.sandbox.push.apple.com, which is used by developers  to test push notification systems. The production system has not changed (yet).  I suspect this was a reaction to the heart bleed bug.  While they have said that none of their services were impacted it seems curious that this would happen at the same time.

If you are experiencing push issues on the sandbox (particularly disconnects), make sure you are using TLS.  You can verify that your push certs are working ok with APNS pusher ( https://github.com/blommegard/APNS-Pusher ).

Push sharp users should  update.


Doing special things in iOS

Monal is unique on iOS because it is able to fully multi task without using  any private APIs. However, I stumbled upon this after setting up the iOS openVPN client and was amazed at how it worked.  It actually hooks into the native VPN interface using Apple authorized private APIs.  If you are an iOS developer, this is an absolutely fascinating read. I didn’t know this was even possible!


A note on bugs

I guess it says something about the varying different configurations and slight differences XMPP servers can have  when even after several months of public testing there were still some serious bugs in the 2.1 release. I know there there are many people who are dependent on Monal for day to day use and I am fixing everything as quickly as I can.  I will put out 2.1.2 soon with further connectivity fixes.