• 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
Creating mixed target iOS and Mac project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating mixed target iOS and Mac project


  • Subject: Creating mixed target iOS and Mac project
  • From: Antonio Nunes <email@hidden>
  • Date: Tue, 24 Aug 2010 10:48:10 +0100

Hi,

I want to create an Xcode project with mixed target for iPhone, iPad and Mac versions of the software. I'm not sure how to do this.

I have the skeleton of an app in an iPad targeted project, and I tried adding a target for Mac. The target got created with a lot of iOS specific settings, which I adjusted (I had to change Architectures to Standard (32/64-bit Universal) and Base SDK to Mac OS X 10.5. I also set the compiler version to LLVM 1.5.

I suppose I need to add some preprocessor directives to main.m to setup the right environment:

#ifdef BUILD_FOR_IOS
    int retval = UIApplicationMain....;
#elifdef BUILD_FOR_MAC
    int retval = NSApplicationMain....;
#endif

Is this the right way to do it, or is there a better way? In addition, the build settings pane does not show the reprocessing section. How do I add the definitions to the build settings?

Also, in the Xcode toolbar Overview popup menu, when the new Mac target and executable are selected, Active Architecture shows "armv7", even though I have the correct architecture settings in the build settings. What's up with that?

-António

----------------------------------------------------
It isn't so important to do great things,
as to do what you do with great love.
----------------------------------------------------



 _______________________________________________
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

  • Follow-Ups:
    • Re: Creating mixed target iOS and Mac project
      • From: Antonio Nunes <email@hidden>
  • Prev by Date: Re: [IB] Cells vs Controls in the Library
  • Next by Date: Re: Xcode uses the wrong version of lib because of hidden search paths?
  • Previous by thread: Re: Xcode uses the wrong version of lib because of hidden search paths?
  • Next by thread: Re: Creating mixed target iOS and Mac project
  • Index(es):
    • Date
    • Thread