Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Thanks, but when I do that, XCode4 gives me a dialog error:
I have to tap on the app icon myself to run it, and it runs ok from there, but then, no debug text
gets sent to the XCode4 Debug Window.
Are you implying that I should see debug text in the Debug Window?
Yes. That error means something is wrong. Try building one of the empty template apps from Xcode. If that doesn't work, reboot your Mac and your phone/iPad, and try again. Sometimes the debugger gets a task stuck in an indeterminate state, and the only way to fix it is to reboot your Mac. (Ok, you could probably fix it in terminal or Activity Monitor if you knew the gory details of the debugger and all the deamons and black magic that make the debugger work.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Yes. That error means something is wrong. Try building one of the empty template apps from Xcode. If that doesn't work, reboot your Mac and your phone/iPad, and try again. Sometimes the debugger gets a task stuck in an indeterminate state, and the only way to fix it is to reboot your Mac. (Ok, you could probably fix it in terminal or Activity Monitor if you knew the gory details of the debugger and all the deamons and black magic that make the debugger work.
Thanks, it seems I've been having this problem since the very first day I tried
running my app on a real device. I've tried deleting, cleaning, restarting,
re-connecting my app, but the error remains.
I did not realize this was preventing me from seeing debug output. I guess
I have to find a way to getting it working or else!
I have my project set to debug release. Code signing is set to iPhone Distribution.
I have both development and ad hoc distribution profiles installed in Organizer.
Bundle identifier is set correctly.
Thanks, it seems I've been having this problem since the very first day I tried
running my app on a real device. I've tried deleting, cleaning, restarting,
re-connecting my app, but the error remains.
I did not realize this was preventing me from seeing debug output. I guess
I have to find a way to getting it working or else!
I have my project set to debug release. Code signing is set to iPhone Distribution.
I have both development and ad hoc distribution profiles installed in Organizer.
Bundle identifier is set correctly.
Not sure what else to do.
Found an official answer to my problem:
developer.apple.com/library/ios/#qa/qa1682/_index.html Loading…
It was a code signing issue with the wrong profile.
Development profiles have the Entitlement key "get-task-allow" set to true,
while Ad-Hoc distribution profiles have the Entitlement key "get-task-allow" set to false.
The "get-task-allow" key decides whether a debugger can be attached or not.
These profile files are binary, but you can open them with TextEdit, and see the
embedded Entitlement keys. I don't think they can be edited by hand.
Anyway, I have to set my code signing to "iPhone Developer" instead of "iPhone Distribution".
Problem fixed!