• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: adding an OS X target to an iPhone project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding an OS X target to an iPhone project


  • Subject: Re: adding an OS X target to an iPhone project
  • From: Karolis Ramanauskas <email@hidden>
  • Date: Thu, 10 Dec 2009 13:20:24 -0600

I had no problems (beyond the initial setup) having an iPhone and OSX targets in one project. I use:

#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED


where required, e.g., prefix.pch or main.m, etc. to let the compiler know if the code section is meant for iphone or osx target. For example, my main.m file:

int main(int argc, char * argv[])


{  

    #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED

        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

        int retVal = UIApplicationMain(argc, argv, nil, @"iPhone_AppDelegate");

[pool release];

return retVal;

    #else

return NSApplicationMain(argc, (const char **)argv);

    #endif

}

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: adding an OS X target to an iPhone project (From: James Bucanek <email@hidden>)
 >Re: adding an OS X target to an iPhone project (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: SCM Error 150000 ("pbxuser is not under version control")
  • Next by Date: Dependencies on custom-rule output not working
  • Previous by thread: Re: adding an OS X target to an iPhone project
  • Next by thread: Re: Project handling multiple developers
  • Index(es):
    • Date
    • Thread