views:

226

answers:

2

Stack overflow

I want to make a universal version of my app available, but I am wondering how is data managed between the iPad and the iPhone versions? -Are they completely independent? or if I have a plist in the iPad app, does it also appear in the iPhone app. If so, is there any syncing etc etc.

I have a few months experience with single iPad or iPhone apps, but never a universal.

Thanks again.

UPDATE: I was interested in the files in the /Documents folder, does this automatically update on itunes syncing at all?

A: 

They are shared, resources such as plists, images, sqlite db's etc. The default "Universal Application" template creates groups for iPhone specific, iPad specific, and shared. If you create the resources in the correct place, they will be compiled into the application bundle for the correct platform.

NWCoder
I was interested in the files in the /Documents folder, does this automatically update on itunes syncing at all?
norskben
A: 

Like NWCoder said, it's all shared. You can run iPad/iPhone specific code by using this:

 //iPad code
 #ifdef UI_USER_INTERFACE_IDIOM
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {

    } else 
 //iPhone/iPod code
 #endif
    {


    }
christo16
I was interested in the files in the /Documents folder, does this automatically update on itunes syncing at all?
norskben
<disclaimer> Just guessing here </disclaimer>The SDK and hardware sandboxing of the applications mean their Documents folders are different, both on the devices (obviously) and under iTunes sync. It would be the same for two phones running the same app, each would sync to iTunes separately.
NWCoder