Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

typecase

macrumors 6502
Original poster
Feb 2, 2005
395
404
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?
 
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.
 
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.
 
I think this is exactly what I was looking for. Thank you csubear and HexMonkey! :)
 
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.