iOS 24 Hour date format

If you are using NSDateFormatter to send dates back to a server be VERY careful.  Specifying a date format string as follows…


and the time for example is currently  09/10/2013  14:00:00, if the user has set their clock to be a 12-hour clock, instead of the default 24-hour clock. You will get a string back of…

2013-10-09T02:00:00 PM

The users preferences overwrite what you are asking for!!

Read the following documentation -

The following sample code from that article will always return a 24-hour clock value regardless of user preferences

<br /><br />NSDateFormatter *rfc3339DateFormatter = [[NSDateFormatter alloc] init];<br /><br />NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];<br /><br />[rfc3339DateFormatter setLocale:enUSPOSIXLocale];<br /><br />[rfc3339DateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];<br /><br />[rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];<br /><br />NSDate *date = [rfc3339DateFormatter dateFromString:rfc3339DateTimeString];<br /><br />

Mobile Apps – Ballpark Costs

When potential clients ask for a ballpark figure on development costs, these are the questions I ask to help clarify whats required and therefore affect the cost. They are in no particular order…

  • What are the target platforms, iPhone, iPad, Android, Windows Mobile?
  • If they want multiple platforms are they aware that native apps are developed using different languages
  • If iPhone do you want a universal version, i.e. the same app runs on iPhone and iPad (thanks @ithain)
  • Whats the target audience?
  • Do you have an idea of how you want the app to flow?
  • Are there existing apps out there that do something similar, if there are what are they and what will make this one different?
  • Are there existing apps that you like the style of or the way they work?
  • Will you apply for your own developers licences so that the app is submitted under your name?
  • Will the app be free, sold for a one off fee, have in-app purchases or have subscriptions?
  • Who will supply the artwork?
  • Does the app need to be location aware?
  • Ideas of timescale for release? (thanks @MrAntix)
  • Are there any hosting requirements? (thanks @MrAntix)
  • Third party services integration requirements? (thanks @MrAntix)
  • Any social media integration?
  • Any security requirements, OAuth, Encryption, etc? (thanks Gary)
  • What is the lowest version of the operating system for a device that needs to be supported
  • Does the app need to support Push Notifications, if yes how will they be delivered in house or third party (UrbanAirship)

And if the app contains dynamic data the following are also important questions…

  • How will the app access the data?
  • Have the web services that supply the information been designed/written?
  • Would you require a content management system to update information contained in the app?
  • If its a Corporate app, what back end data do you need to access and synchronise (thanks @ithain)

Update 2 Extra items thanks to @adrian_bigland

  • how many languages need to be supported
  • who will do the translation
  • how will translations be tested – often you need to write code to present all the error dialogs etc. for ease of checking.
  • different UI layouts, or will all the languages fit? German always stresses label lengths, and non FIGS languages might need their own screens, in extreme cases.

Offline support:

  • do you need to store data from web services, so that when you are offline, the experience is seamless?
  • can the user upload information from the app? You often need to store events for analytics while offline, for example.
  • are you going to have problems merging external and local changes? (This way, madness lies).

Custom components?

End of update

Obviously the answers to these questions are likely to lead to more specific questions, but it helps with the thought process involved with what might be required

I would be really interested to know if there are any other questions you ask that I’ve not included?

UPDATE: The first question I am going to start asking is if they have a budget in mind, some projects can be completed in 5 days, some in 5 months, but if they think that they can get the next instagram for £1K, they are wasting my time and their own.

UPDATE: Yeeply are currently sponsoring a site that gives rough calculations – its not got all the options and doesn’t allow you to select multiple platforms but it will give you some idea of  cost ranges App cost calculator – lovely interface – needs a few more options –

See what I do

CCLabelBMFont – not displaying

I hit a problem today where the CCLabelBMFont wasn’t rendering the text I wanted at all. I created the the fnt file using

Turns out that as it creates the underlying png for some reason it saves it in a flipped format, therefore you need to load the png into your favourite graphics package and flip it vertically before using it in your project

See what I do

AirPrint – direct to the Printer

If you have an AirPrint enabled printer and an iPhone/iPad running iOS4.2 or above you can print directly to the printer without the need for both devices to be connected through the same WiFi access point. On your iOS device, go to your WiFi settings and in the list of networks you should see an entry that relates to the printer (so long as you are in range), and hey presto it all works

Free icons website

Great site for sets of free icons that can be used in your apps

Localisation language names

When creating a new localisation file Xcode expects you to supply the correct name for the file, the list of valid values is here

CFBundleiconfile does not have an extension

Currently there is an issue with Apples Application Loader, although the documentation states that you can omit the file extension from the Icon File name, and this works when running locally, when you come to submit it to the app store it fails validation.

At the moment you have to specify the names using the CFBundleIconFiles
Screen shot 2010-07-28 at 16.09.49

This is also a useful link to the Apple site that explains what icons are need for what device

See what I do

Truly quit app under iOS4

Great article that explains how to terminate your app so that it doesn’t go into suspend mode, basic details are here

Multi-tasking can be great, but it has added some complexity to programming on the iPhone. For many apps there really is no advantage. For instance, does the “That’s What She Said” button really need to stay in memory?

It’s some added complexity that programmers don’t need.. some of the more complex memory intensive apps will just exit anyways, and programming the app to suspend can be a highly complicated task.

Fortunately there is a simple way to make your iOS 4 apps terminate for real when the user taps the home button.

This is a simple process:

Open your info.plist file
Add The Key UIApplicationExitsOnSuspend
Set the new key to YES
Now your applicationwillterminate: method will be run when the user taps the home key, and your app will exit for real.

See what I do

Getting Images onto the iPhone Simulator

To add your own pictures to the simulator, get the simulator running and then drag your image onto the simulator. This will cause the simulator to open it mobile safari. Then mouse down and hold on the image, you will then see the following prompt…

Upload image to simulator

Upload image to simulator

Clicking save will then include your image.

Payments from Apple – Company VAT Return

Working out what you do with a payment from Apple, when you are lucky enough to get one, can be quite tricky for a VAT registered company, this is the information I’ve been able to gather so far, via the Apple Developers Forum (so thanks goes to them)…..

Apple act as an undisclosed agent. You supply your products to Apple (one supply line), who then market and supply them to consumers (another supply line). Apple charge VAT on their supply line, as you’d expect.

Apple’s commission is a markup in the price, which they then add VAT to. This is very important. At no point do Apple invoice you for commission. Because of this, under HMRC rules this isn’t deemed to be a supply of “agency services” from Apple to you (the agency services in question being the marketing and sale of Apps on iTunes). That’s the second supply line – Apple to the Consumer. You can then account for VAT on your supply to Apple as normal. Because you are supplying software to Apple’s EU subsidiary, HMRC’s place of supply regulations mean you’re outside the scope for VAT.


You sell an app for £0.99 (it’s an easy number to use in this example, for simplicity)
Apple charges the user £0.84 (plus VAT)
Apple takes their commission (£0.25), except it’s technically a mark-up on price, not commission.
This leaves £0.59, which is the cost of supply. This is what you would invoice Apple for (even if you’re only generating invoices for your own internal paperwork)
As you supplied your product to Apple for £0.59, who then sold it on at a markup to the public, you were supplying directly to a business, and thus outside the scope of VAT.

Fortunately, the contract you have isn’t with Apple UK, but Apple Sàrl, based in Luxumberg. When a seller in one EU member state invoices a company in a different EU member state they can zero rate the VAT. You should still put VAT as an item on your invoices, but rate it at zero (ie, £0.00). As long as you use the addresses below on your invoices, HMRC should be satisfied.

Really Important point: Because your iTunes income is coming from another member state, you need to declare it in Box 8 of your VAT return. If you have an accountant you don’t need to worry about this, you just need to make sure s/he is aware your App income is from within the EU but outside the UK.

Should you need an address and Luxumberg VAT number for your records, it’s as follows:

Billing Address:
iTunes s.à r. l.
8 rue Heinrich Heine
L-1720 Luxembourg
TVA/VAT No.: LU20165772

Invoicing Address:
App Store Invoicing
Apple Operations Europe
iTunes s.à r. l.
Hollyhill Industrial Estate
Cork Ireland


This is taken from a comment posted on this blog entry (just in case you don’t read the comments)

Most of what is said here has got the general gist.

Except, you do not need to fill in box 8 of the VAT return – that’s for goods only and these are not that.

Basically, Luxembourg being part of the EC for VAT, you need to account for this as a reverse charge sale – so essentially you:

- Do not charge VAT to Apple
- Need their VAT number on the invoice
- should make reference on your invoice that this is “reverse charge sale”. I know that Apple probably self-bill in anycase.
- Essentially what reverse charge means is that you record the £100 + VAT as a sale and as a purchase. This means that the net effect of the transaction is nil and you will pay no VAT. You will however have many figures on your VAT return because of the way it’s done.
- You will also need to do a quarterly EC Sales list – basically just a summary of how much you’ve sold to each of your EC customers.

I should say we’re online accountants and work with a lot of app developers. Please feel free to give us a call to ask any specific questions you may have.

Kind regards,

3 Wise Bears



See what I do

Previous Entries