★ TouchArcade needs your help. Click here to support us on Patreon.

iOS versions misunderstanding

05-22-2011, 03:41 AM
#1
Joined: Apr 2011
Location: Italy
Posts: 81
iOS versions misunderstanding

Hi all,

i'm almost finishing my iPhone game development, and studying how to add Game Center features (Achievements & Leaderboard). I understand iOS 4.0 is the first release of iOS supporting game center, i also know that iOS4.2.1 is the latest version supported by 3G devices.

My wishes are supporting the widest pool of devices while offering Game Center services... so "iOS 4.2.1 Deployment target" is the best choice to build whole the applicaton with xcode.


The question is: how is possible that apps like Angry birds, Cut the rope, Infinity blade SUPPORT GameCenter REQUIRING iOS >=3.0 ???

I'm a bit confused...

Thanks in advance,

sigLuca
Game Artesan
05-22-2011, 04:05 AM
#2
Joined: Sep 2010
Location: Morestel, France
Posts: 572
Your game can support game center even if you set your ISO Deployement Target to IOS 3.0.

Deployement target mean: minimum ios supported. But as you are compiling with a recent version of xcode and ios libs (check that your base sdk is set to latest IOS), you'll get game center. But if you are running your game an an old version (not supporting game center) your game will crash. So, to solve this you have to weak link your game center libs (I don't use game center yet, so not sure about witch one it is). Normally, when you init game center (I'm guessing) your code need to handle the case when it doesn't init (will happen on old device).

Hope it helps...

JC
05-22-2011, 05:30 AM
#3
Joined: Apr 2011
Location: Italy
Posts: 81
Thank you for your help. Now it does make more sense...

sigLuca
Game Artesan
05-23-2011, 02:42 PM
#4
Also, be careful with GameCenter and iOS versions. Even though some classes do exist in 4.0, they were not finalized for general use until 4.1.