Question

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 info.plist file (set in build settings)

enter image description here

  • have different bundle id, different icons and different prefix headers

  • have different schemes (autocreated)

enter image description here

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.

enter image description here enter image description here

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).

Was it helpful?

Solution

I figured out, that I have to do following steps EVERY TIME I switch between targets to throughly solve the problem:

  1. clean the project

  2. restart mac (sometimes just restart xcode helps, but not always)

  3. 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:

  1. The features of Paid and Free version mixed up (skipped step 1)
  2. The app installs right, but MAC can't run app at all, or run wrong version of app (skipped step 2 or 3).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top