Mac First cocoa app doesn't run on other machines.

typecase

macrumors 6502
Original poster
Feb 2, 2005
290
161
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?
 

csubear

macrumors 6502a
Aug 22, 2003
613
0
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.
 

HexMonkey

Administrator
Staff member
Feb 5, 2004
2,166
434
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.
 

typecase

macrumors 6502
Original poster
Feb 2, 2005
290
161
I think this is exactly what I was looking for. Thank you csubear and HexMonkey! :)
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.