Universal Binaries

Discussion in 'Mac Programming' started by Miguel Cunha, Sep 21, 2012.

  1. Miguel Cunha macrumors 6502

    Miguel Cunha

    Joined:
    Sep 14, 2012
    Location:
    Braga, Portugal
    #1
    Hello everyone!

    I'm developing an application and I'm thinking to make it compatible with my oldie PowerPC :apple: computer.

    I'm a newbie in programming, so the question is very simple.

    How do I make an Universal Binary?

    Thank you all.
     
  2. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #2
    Xcode 4 does not compile for PowerPC. If you are using Xcode 4 you cannot make universal binaries.

    If you are using an earlier version of Xcode, set the Architectures build setting to build 32-bit universal or 32/64-bit universal. Choose Project > Edit Project Settings to access the project's build settings.
     
  3. Miguel Cunha, Sep 22, 2012
    Last edited: Sep 22, 2012

    Miguel Cunha thread starter macrumors 6502

    Miguel Cunha

    Joined:
    Sep 14, 2012
    Location:
    Braga, Portugal
    #3
    It worked. About Xcode 3...

    Thank you szymczyk,

    I'm using Xcode 3.1.4 in a PowerPC mac and it worked just fine.
    Actually, it was easier than i thought.

    I've checked your book by the way.
    It's a pitty you don't have one dedicated to Xcode 3, which is what I need.

    Can you recommend a book to Xcode 3?

    Best regards
     
  4. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #4
    A search for Xcode 3 on Amazon shows the books Xcode 3 Unleashed and Professional Xcode 3. I have not read either book so I can't recommend one or the other.
     
  5. Miguel Cunha thread starter macrumors 6502

    Miguel Cunha

    Joined:
    Sep 14, 2012
    Location:
    Braga, Portugal
    #5
    Universal compatibility

    Another doubt arose.

    If Xcode 4 cannot build Universal Binaries, how can make my universal application compatible from 10.5 to 10.8?

    Thank you again.
     
  6. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #6
    The universal application you built on Xcode 3.1.4 will run on Mac OS X 10.5 to 10.8. It won't be able to take advantage of any features added in later versions of Mac OS X, such as auto save.

    If you're using Xcode 4, you can set the deployment target to 10.5, and your application will run on Intel Macs running 10.5 to 10.8. But if you are using Xcode 4 I recommend supporting 10.6 and later. The main reason to support earlier versions of Mac OS X is to support PowerPC Macs, and Xcode 4 doesn't support them. To support PowerPC Macs, you must use Xcode 3.
     
  7. Miguel Cunha thread starter macrumors 6502

    Miguel Cunha

    Joined:
    Sep 14, 2012
    Location:
    Braga, Portugal
    #7
    Now I understand why so many developers are only supporting from 10.6 up.

    Makes perfect sense.

    Thank you for your help Mark.
     
  8. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #8
    I would not absolutely count on that. I ran into an issue that rendered an app unusable between 10.5 and 10.6: NSImage changed to an immutable object that silently ignored focus locks, so the undocumented change that issued no console messages was quite difficult to debug. Perhaps it was improper technique on my part, but it does show that Apple sometimes improves the system in ways that can break older code.
     

Share This Page