Random Thoughts and Musings of a
Mobile Application Developer
I found a very nice entry on how to keep your User default synchronized with your Settings.bundle here
I modified the example on that page a little to make it possible to reset all your applications settings to their defaults (like a factory reset of your App)
So without further Ado, here's the code to do it:
Apple issued a notice to all Developers today that the Production Apple Push Notification service will use a 2048-bit TLS/SSL CA Certificate from entrust from the 22 of December onwards. That means, that all Servers using the Push notification Service have to update the trust on the new CA.
And here is how:
Update 22.01.2012: Thanks to asmera I discovered, that Apple seems to be stricter with the JSON you send and that since a few days the Apple Servers do not accept the output from the example given here. I changed the code in here as well as in the downloadable example to make it work again.
Today I will show you a quick implementation of an Apple Push Notification Server provider in C. (Now updated with the new Entrust CA cert and instructions how to use it. For information on how to trust it go here) Some parts of this (like creating the needed certificates) are taken from this very good tutorial about building the same thing in php. For a good intro on the topic and how APNs works internally you should first read this.
You're done? Good, then let's get started:
Today I found that there are multiple possibilities to resolve a Hostname on iOS, but two of them do not always succeed. If you switch from 3G to Wifi a lot I saw, that sometimes the resolution would not work anymore. These resolution Methods are for C, because thats what most libraries are written in and my goal was to extend one of those and add name resolution.
I first tried with the
int res_query(char *domain_name, int class, int type, char *answer_buffer, int answer_buffer_length)
Today I will post all my findings on the iOS 4 Background Audio and VoIP stuff, so other do not have the same troubles I went through
This tutorial is for Applications using a C library to handle sockets and not the High-Level Abstractions from Apple. If you want to do this, you should read the Documentation over at Apple here
First you need a new Key in your Info.plist stating your Background modes called UIBackgroundModes with the following two values: