Short problem description:
XCode 4.2 install right Target on device, but debug (run) always only one of them.
Preconditions:
XCode 4.2 on MAC, iPad as target device
I have two Targets: PRO & FREE. They both:
have different bundle id, different icons and different prefix headers
have different schemes (autocreated)
Problem:
I can't debug FREE version, because it is always run PRO version. I follow steps:
1) Switch to FREE. Clean build. Run. It install FREE version, but failed to run it.
2) Switch to PRO. Clean build. Run. It install PRO version and run it OK.
3) Repeat step 1. Now there are no errors, but it run PRO version instead of FREE.
If I trying do the same in Simulator instead of real device, the problem the same, except that there are no error message in step 1, but progress bar shows: "Attaching to Dictionary" (it never ends).
I figured out, that I have to do following steps EVERY TIME I switch between targets to throughly solve the problem:
clean the project
restart mac (sometimes just restart xcode helps, but not always)
restart device
This is very annoying and time-wasting, but it is only solution I found.
If I didn't do one of this steps, I run into one of following: