Re: adding an OS X target to an iPhone project
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