writing universal program

Discussion in 'Mac Programming' started by Nishad, Mar 25, 2008.

  1. macrumors newbie

    Joined:
    Aug 2, 2007
    #1
    Hi all,

    i am using a mac mini (intel based - mac os x Tiger) and developing an application which want to read files and working on this using cocoa - objective c in Xcode.

    i want to run this application on both intel based machine and power PC.


    can anybody tell how can i achieve this . if u can tell some functions that is good.

    With regards
    Nishad.
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    I believe in Xcode 3.0 and above, all new projects are set to build as universal binaries by default. But if you're running an older version you will need to Get Info on the target, go to the Build tab and there should be an architectures property you can change to include PPC.
     
  3. macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #3
    Also depending on what types of files you want to read/write you could have no problems, or run into the Big/Little Endian issues.

    There are many file formats already supported on OSX in Cocoa frameworks (and QuickTime). Images, movies, text (RTF, XML, HTML, various scripting formats).

    You can also transparently save arbitrary objects to and read them from disk-based files using the Archiving features of Cocoa.

    If you want to test the PowerPC-based version of your program you can run it in the PowerPC translator in OS X called Rosetta. Just Get Info (Command-I) the app in the Finder and check the box that says "Open using Rosetta."
     

Share This Page