Archive for the ‘iPad’ category

Why the iPad 2 will have a 2058×1536 resolution

January 21st, 2011

Let me take you back to the old iPhone 2G, 3G and 3Gs. This device had a screen resolution of 320 pixels wide by 480 pixels high.

Developers were explicitly told to code for that resolution and did so with great success. This immediately raised a concern for me, what would happen in the future, when Apple would release a new device with a higher resolution, something they surely would?

Well along with many other iPhone fans we heard the keynote from Steve Jobs announcing the Retina display for the iPhone 4. This had a resolution of 640×960. It left a number of people, developers, etc wondering how they would support both the existing iPhone and the new iPhone 4 in their apps.

As I wrote in a previous post, Apple actually pulled off something very remarkable and very clever with the Retina Display.  They kept the screen ratio exactly the same, and made the screen exactly twice as big.

Assets in iPhone applications not ‘Retina Compatible’ simply had all of their graphical assets doubled up in size.  320 pixels wide became 320 points wide and so on.

How did a developer support the retina display, why they simply added an image of the same ratio, but exactly doubled to their app bundle but instead of a .png extension they added @2x.png to the end of the file with the same name.

It was incredibly simple to implement and required zero code changes whatsoever.

iPad 2

The iPad has a resolution of 1024×768 which does look amazing but unfortunately for the iPad, the iPhone 4′s Retina Display was released only slightly after the iPad.

Now there has been lots of commentary as to what the resolution would be on the iPad 2, would they simply increase it slightly or would they change the ratio, etc.  There are commentators stating that a resolution of 2058×1536 would be very unlikely due to memory requirements.

In my personal opinion, it’s actually incredibly unlikely we will see any other resolution other than either keeping the status quo of 1024×768 or going for 2058×1536.

If Apple were to release an iPad with a different screen ratio or not @2x, existing iPad apps would not fit the screen properly.

People will argue but Windows and OS X apps don’t worry about this, no they don’t but then they also weren’t explicity told your only option is to provide a full screen application like iOS developers are.

Apple could scale these, but from experience of using iPhone applications on the iPad, scaling tends to look terrible.

The reason I believe 2058×1536 is likely, is first it has been found in the iOS 4.3 beta’s a number of iBook image assets with the @2x extension and are exactly doubled, but also that Apple can apply exactly the same logic as they did for the iPhone 4 and developers will have an option to support the new display or not without adversely affecting the layout of their App.

Additionally if we don’t have a double resolution we end up with the exact same type of fragmentation of iOS that Apple complains about the Android ecosystem.

Could it be called ‘Retina’ as the pixel density probably isn’t high enough, well I don’t know.

* Image credit Glenn Fleishman

Custom Logging in Obj-C

December 7th, 2010

If you’ve used Objective-C for Mac or iOS development you’re probably familiar with NSLog(); to log to the console.

Well that is fantastic for development, but you don’t really want to output your debugging logs on distributed iOS apps do you?

It would be a real pain to remove every instance of NSLog from your code everytime you wish to distribute your app.  Well you can solve this with a custom logger.

In your Prefix.pch file add the following bit of code

#ifdef DEBUG
#  define RHLog(...) NSLog(__VA_ARGS__)
#else
#  define RHLog(...) ;
#endif

Then whenever DEBUG is set (either by adding DEBUG to your pre-processor macros, or using the -DDEBUG flag) instead of calling

NSLog(@"String: %@", stringValue);

you can call

RHLog(@"String: %@", stringValue);

And when in debug mode the string will log to the console, in Release, Ad-Hoc and Distribution builds it won’t

However you can go one further than this and actually produce a much nicer logging function using

#ifdef DEBUG
#   define RHLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define RHLog(...)
#endif

and when you call your function like so

RHLog(@"Testing");

You’ll see the following in your console

-[AppDelegate startup] [Line 123] Testing

* Image Credit Fryhstyxei

The iPhone App Piracy Problem

August 18th, 2010

The iOS (that’s the iPhone, iPad and iPod Touch) AppStore has a problem.

A piracy problem.

If you have a jailbroken iPhone, that is one where you have run a bit of software to allow you to download apps outside of the AppStore then you may have come across pirated apps, you may not have installed them but you’re probably aware of them.

Before I talk about the morality of piracy, let me address the question of why

Why do pirates crack apps?

This is an interesting question and to understand the piracy we must address the motivations

1) Try before you buy

I’ve heard this many times for people’s justifications as to why they crack apps.

Apple doesn’t offer any form of demo or free trial for Apps and so I can understand this motivation.  However there are two problems with this justification

  1. Many of the popular apps already provide a ‘try before you buy’ in the form of a free ‘lite’ app from the App Store itself
  2. The conversion rate from cracked to paid is less than 0.5% (source)

The conversion rate of cracked to paid is incredibly low which simply blows any form of arguement of try before you buy out of the water… it’s total rubbish.

Sure some of you out there have done so, and I applaud you for that, but unfortunately you are in the very small minority.

2) A hatred of DRM

DRM (or Digital Rights Management) is an encryption and licensing technique used on DVD’s, BluRays, some iTunes purchases, etc and Apps from the AppStore.

It’s a system, whether you like it or not, that restricts where you can and can’t install your purchase. How many times you can install it and then what you can do or modify in it once you have installed it.

Cracking an App on the iPhone removes this encryption and DRM.

Again I can understand this, if someone wants to remove the DRM and encryption for their own use, then for me this is fair enough and I have no problem with them doing this.

But how, I ask, did that app end up on file sharing sites and specialised cracked app repos.  Opps sorry you’ve lost your argument again.  The minute you share that DRM free version you’ve lost my respect again and you’ve breached my copyright.

3) A fundamental belief that software should be free

This is the last category and it’s either that the user has a belief that all software should be free or they simply don’t care about the law.

The former, is a belief that a number of people hold, however who are they to decide under what license my software should be released.  Did they write it? Do they own the copyright? NO they don’t. So they do NOT get to decide under what terms my software is available.

If they want to write their own software and release it for free I will defend their right to choose that path, but at the same time I will defend anyone who decides to charge for their software, as it is their right to do so.

The rights of a developer

A developer works, a developer has a family, a developer has a mortgage, a developer has taxes to pay, a developer has computers to purchase to develop on, a developer has software to purchase (developers don’t use pirated software to develop commercial software, that would be hypocritical wouldn’t it!), a developer has servers to license, domains to buy, food to put on the table.  Do you see where I am going with this.

That push notification feature you love, that scheduling feature you love so much.  A server is involved there and who pays for that? Well either the developer makes a loss paying for it, or legitimate customers have to pay more simply to cover the cost of you giving away the app for free.

A cracker in all likelyhood isn’t a developer, they probably have a job outside IT.

Think about it this way, if you work in an office and an intern comes in and claims credit for all your work and doesn’t get paid, but because they’ve claimed credit for all your work you don’t get paid either, in fact you get made redunant is that fair? Is that right? No of course it’s not.

Developers do not work for free, they have the same bills and financial outgoings as anyone else.  So a message to the app crackers who distribute cracked apps out there, what gives you the right to give away my software for free and prevent me from paying my mortgage this month? ABSOLUTELY NONE, you are thieves… end of story.

Apple’s iPad UK pricing

May 8th, 2010

I’ve read a lot of comments online since Apple announced it’s international iPad pricing, and most of those comments revolve around ‘Rip-Off Britain’.

Now it is true that must tech imported from the USA seems to cost more with this mythical international tax and at first glance the iPad pricing in the UK is a lot more but let’s break it down for the 16Gb WiFi iPad.

In the US this is $499. The UK price announced is £429.  At a direct comparison at today’s exchange rates of 1.48, that comes to $648.  Wow that seems an awful lot more.  However that simply isn’t a fair comparison.

In the US all prices exclude sales tax which our friends in America accept is always added at point of sale and calculate the price in their head all the time.  In the UK we have VAT so the tax is always added (and at the moment it’s 17.5%).  So let’s take off the VAT from £429 and it comes to £365.

Convert that to USD and we see the UK iPad price is actually $540.  So the UK iPad is actually $41 more expensive in the UK than the US… that’s a whole £27, although yesterday it was £25.

I’m sure there are some import taxes or costs and £27 more isn’t really a lot of money, sure I’d prefer not to have to pay it but it isn’t what I’d call rip-off Britain compared with the US price.

If anyone is to blame it’s the level of VAT we get charged in the UK.

If we compare our £429 iPad with VAT to what it costs, in say California with federal and local sales tax of 10.75% we see that in the US the iPad costs $552.64 which is £373.

So the entire reason we feel we are being ripped off for our technology is nothing to do with Apple in this case and everything to do with the Government and our VAT.

Of course importing it isn’t a solution either, because you did remember to pay your VAT when it came through customs didn’t you?

Apple’s delay to international iPad shipping and how it harms developers

April 14th, 2010

Apple has today announced that they are delaying international shipping of the iPad until the end of May.

As a user, and future owner of one of these devices I’m disappointed.

As a developer, I’m angry and let me explain why.  International developers are now at a severe disadvantage to US based developers without great expense to themselves, of finding a way to import the iPad from the USA.

US based developers have been able to see how their app looks, feels and works on a physical iPad whilst those of us not in the US have only had the simulator which is simply not good enough.  Anyone who has developed anything more than a one screen app for the iPhone will know that the simulator often behaves differently to the ARM architecture of the iPhone itself.

I’m not asking for Apple to give developers discounts, special advance access, free shipping, etc.  All I am asking is for Apple to allow a level playing field for developers and so that international developers that have PAID to register in the iPhone Developer Program should have a way of gaining access to the devices to be able to develop and test on.

At the moment there is no fair playing field between developers in the US and those of us who are not, of which I wouldn’t be surprised if there are more outside the US than in it.

Robert Scoble has written a great blog post on why Apple’s prediction was so wrong.