First cocoa app doesn't run on other machines.

Discussion in 'Mac Programming' started by typecase, Aug 1, 2005.

  1. typecase macrumors 6502


    Feb 2, 2005
    Hello All,

    After building my first cocoa app with XCode, I thought it would be fun to send to a friend to try out. I zipped the application file and emailed it to him and he can't seem to run it. It seems to appear and disappear from the dock. After a frustrating hour and half, I've decided that there must be something simple that I'm missing. I've tried sending it a dozen different ways, including a .dmg but something still seems amiss. I've also tried it on other machines and I get the same thing. Why won't my cocoa app run somewhere other than the development machine? Is there a setting in Xcode I've missed?
  2. csubear macrumors 6502a


    Aug 22, 2003
    Did you build it in release mode? When you build in debug the app is compiled with zero link, and won't work on other machines.
  3. HexMonkey Administrator


    Staff Member

    Feb 5, 2004
    New Zealand
    Select Project->Set Active Build Style->Deployment, then rebuild your project. This build style has zero link off, which, as csubear said, will allow your application to work on other computers, although to use the debugger you need to use the "Development" build style.
  4. typecase thread starter macrumors 6502


    Feb 2, 2005
    I think this is exactly what I was looking for. Thank you csubear and HexMonkey! :)
  5. caveman_uk Guest


    Feb 17, 2003
    Hitchin, Herts, UK
    Also if you reference any non-standard frameworks in your code you need to either embed them in the built app (best option) or install them in the correct place on the users machine.

    This is unlikely to be the reason for your problems (it's probably the build style as others have mentioned) as it's your first app and unlikely to have used any non-standard frameworks, but it's worth remembering for the future.

Share This Page