简体   繁体   中英

Mac source wont run on my Mac

Ok I'm having a really weird problem and hopefully somebody might know what the problem is. My friend and I are collaborating on a project. He's sent me the actual .app files before, and the app launched perfectly. He sent me the source code and I was able to build and run it perfectly. But then I began to prepare the app for distribution, so I followed the instructions on Apples dev page on how to prepare it for submission (build and archive, test installation with terminal, etc). But then a few hours later I tried to run my apps, and they dont work! I just get an app not responding. It launches, but doesnt respond. Even the same exact files that worked before no longer work.

I understand this is an extremely generic question and the only hope of anyone being able to help me is if you went through the same thing. I'd give details, but they're useless, because I was literally able to just hit build and run on my friends computer and it worked without a single configuration. We're both using Xcode 3.2.5. Any ideas?

I don't know the reason the app isn't responding, but here are some things you can try in order to narrow it down:

1) Run the app from the Terminal, like this: ./MyApp.app/Contents/MacOS/MyApp Maybe it will print a helpful message to stdout that will give you a hint about what is going wrong

2) While the app is stuck (not responding) run Shark (or similar profiling tool on it) and get a stack trace of where it is hanging out at. That might give you a clue as to where it is stuck.

3) If all else fails, you can start inserting printf()'s into the app, starting at the top of main. Then run the app from Terminal (as in step 1) and see what the last printf is that gets printed. Lather, rinse, repeat, until you find exactly where execution got stuck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM