How do I run a universal app on the iPhone 3.1.3 simulator?

Posted by bpapa on Stack Overflow See other posts from Stack Overflow or by bpapa
Published on 2010-05-03T15:41:34Z Indexed on 2010/05/03 16:08 UTC
Read the original article Hit count: 275

Filed under:
|
|
|

I'm working on a new app that I want to be universal for the iPhone and iPad. I started out with the "Create a Window-based app" wizard, and it created separate app delegates in "iPhone" and "iPad" groups. Since I already was quite familiar with iPhone dev, I did that part of my project, and now I'm ready to do some iPad stuff.

So... I started out by adding a UISplitViewController to my iPad delegate, switch the Active SDK to 3.2, and it works! But when I switch back to 3.1.3, and try to run it in the simulator, Build and Go fails. For starters, I see:

...path.../iPad/AppDelegate_Pad.h:13: error: expected specifier-qualifier-list before 'UISplitViewController'

I've got my Base SDK set to 3.2 and my Deployment Target set to 3.1.3. I thought that was enough. But I also have found in the documentation this method to conditionally compile:

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200
   MyIPadViewController* vc;
// Create the iPad view controller
#else
   MyIPhoneViewController* vc;
// Create the iPhone view controller
#endif

So do I need to do this everywhere? It seems like an awful lot of code to add (that I'll be getting rid of in a short time for 4.0 anyway) so I feel like I must be doing something wrong. And, I don't even have any idea how this works for things like @property or @synthesize declarations.

tl;dr version of the question - did I miss a setting somewhere?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipad