Archive for November, 2008

iTunes App Reviews

Friday, November 28th, 2008

All in all, independent reviews on iTunes of your applications is a good thing.  Although there may be the occasional fellow who has just had a bad day and gives you 1 star because they didn’t read your description properly.

From a developers point of view, the reviews offer a somewhat anonymous way for your customers to give you feedback.  It’s a valuable mine of feature possibilities and ‘bug reports’.  The problem is, however, that you can’t easily get the whole picture just by using iTunes. 

You see, all the review comments are kept contained to the separate stores around the world.  So US customers and developers can’t easily see Australian comments and feedback. 

Perhaps there’s a better tool out there (if there is I’d love to know about it) but currently if you rely on iTunes to read your reviews, you’ll never be able to read all your reviews at once.

To get around this problem, you’re going to have to be a bit shifty..

  1. Start iTunes normally and go to Store->View My Account
  2. Enter your password
  3. Click on “Change Country”
  4. Pick another country that will have reviews you can read the language of :)
  5. Accept the next screen..
  6. Accept the license agreement
  7. When asked for a credit card in that country, hit Apple-Q and get out of iTunes
  8. Now load iTunes again..
  9. Ta-Da! You’re now browsing the other country’s iTunes store

To get back it’s as easy as going to Settings->View My Account again and as soon as you enter your password it’ll realize you’ve done something odd and put you back in your native store.

So there you have it.  Again, if there’s a better way to do this PLEASE let me know!

Where’s my iTunes Connect money?

Tuesday, November 25th, 2008

If you’re an iPhone developer like me, and you’ve been making money but haven’t been paid yet, you’re probably asking the same questions I’ve been asking.

“When do I get paid?”, “When will Apple transfer my money?”, “Does iTunes Connect give me my money in one lump sum?”, “How long should I wait until inquiring about my money?”

Well, I can’t answer all of the questions, but I can shed some light with my experience with the whole deal.

Financial Reports

You must wait for these after the end of the fiscal month.  Note that this is not the same as the calendar month, so don’t assume that you’ll get paid earning up to the 30th or 31st. The reports will start coming in about 10 or 11 days after the end of the fiscal month and may take 3 or 4 days before all the reports are ready. 

You’ll get a report for each region.

  • Australia
  • US
  • Canada
  • UK
  • Eurpoe
  • Japan
  • Rest Of World

Some have noted that they didn’t receive what they expected at all – some in the order of half of what they were expecting. My experience has been good though with differences only ranging in about +/- $5

Bank Payments

If a region reaches US$250 or more owing to you, then you can expect payment into the bank account you entered in iTunes Connect. Because each region is seperate, you will receive one payment from each of the regions that owe you more than US$250.  

Payment for me occured in 14 days after the reports were ready, but some have claimed that Apple only pays on the 2nd of the month (obviously not in my experience) 

Be warned that your bank may charge you steeply for incoming foreign currency transfers.  In my case I was charged $15 PER REGION.  So it really adds up if you’re not prepared.  Talk to your bank – if you’re rolling in cash they’ll be more than happy to come to an agreement :)

Optimizing Objective C for iPhone

Monday, November 24th, 2008

There are so many apps out there for the iPhone that are doing some pretty graphics/algorithmically intensive stuff.  Most are right on the money when it comes to responsiveness, but some are just woeful!    

Perhaps it’s the promises of fame and fortune that seems synonymous with iPhone programming, but many developers new to Objective C are doing straight ports or just writing plain ObjC code until their app ‘works’ then just release it.  There seems to be a feeling that if an app is slow, the device just can’t handle it.  

I’ve been stepping through the hoops of (relatively) computationally heavy apps at the moment with the creation of a generic physics engine for use in a bunch of 2D based games.  Because it was my first app with serious algorithms in it, I didn’t give optimization much thought. And if you believe most ‘Good Software Practice” guidelines, that was a good thing. (optimize last, or you’ll be optimizing things that need no optimization at all.)

But perhaps some thought is necessary.  At the beginning, it’s very nice to go down the path of using pure ObjC throughout your code.  Let’s face it – it has a nice set of design features that make you feel like you’re on a fluffy cloud rather than the hard stainless steel bench of C.  And if you’re particularly sick like me, [you setLovesSquareBrackets:YES]. But of course the nice features of ObjC come at a cost, and the biggest one is the passing of messages.  C/C++ programmers often forget that when invoking a method on an object in ObjC, you are actually passing a message to the object which has to be converted into a function call at runtime.  Great for flexible, extendable libraries – bad for speed.

So you can either start your development with core components using plain C calls, or you can do what I did and wait until the ‘end’ and use the profiler.  The ‘Instruments’ tool in conjunction with remote iPhone SDK debugging is great.  You can actually run the app on the device and get statistics about what you’re app is doing and when – without a huge penalty to performance.  

Take a typical recording and keep an eye out for the msg_send call, and how much time is spent there.  You may actually find that you’ve introduced a dependency lock that’s slowing things down or you may have an update timer that’s just being ridiculous and updating a billion times a second. 

But if you find out that a lot of time is spent calling msg_send, all hope is not lost.  You can still do some optimizations that help out.  For the other things I’ll talk about them later. 

In simple cases, you do some of the internal work of ObjC yourself and cut out the middle man (sourced from here):

-naive {
  for(i=0; i<50000000; i++)
    [obj hello];
}

-optimised {
  typedef id (*hello_t)(id, SEL, ...);
  hello_t ref = [obj methodFor:@selector(hello)];
  for(i=0; i<500000000UL; i++)
    ref(obj,@selector(hello));
} 

which will work in a lot of cases.

But sometimes, you just have to revert to C.  Go back to the profiler and see what’s happening.  If there are still a lot of msg_send calls clogging up your execution time, then you’ll have to strip out the offenders and just write C functions.  It’s really not that bad..