4

I have an app built on Xcode 4.2, iOS 5, deployment target iOS 4.2, building for debug, with valid identity/provisioning profile (they work under Xcode 3), phone (actually an iPod Touch 4.2.1) plugged in and acknowledged by Organizer, showing the provisioning profile.

The app runs fine under the simulator, but when I compile/run for the Touch it says "Build Succeeded" and then immediately afterwards "Finished running XXX on iPod Touch" appears in the build progress box. Neither the Xcode console nor the Touch's console show any messages. No device logs either. The application doesn't appear as installed on the device. Breakpoint at entry to applicationDidBecomeActive is never hit.

Any idea what's wrong? I've searched Xcode 4 high and low for any sign of a build log that might contain hidden build/deployment error messages, but can't find anything.

I did find this thread, but mucking with the "Architecture" stuff produced no change.

Aha!! There are "Architecture" entries under both "PROJECT" and "TARGETS" and I was mucking with "PROJECT". Setting the "Architecture" under "TARGETS" caused it to start working. (YOY do they have both, when one is ignored, and YOY don't they produce some sort of error message in this situation?)

Community
  • 1
  • 1
Hot Licks
  • 47,103
  • 17
  • 93
  • 151

2 Answers2

2

What device are you trying to run on? It is likely you need to add "armv6" as a build architecture. XCode doesn't do a good job of telling what's wrong in this case. Try the following.

  1. Select your project at the top of the Project Navigator and choose Build Settings in the right pane.

  2. Select the ARCHS setting under Architectures and add "armv6" by choosing "Other..."

  3. Make sure the ONLY_ACTIVE_ARCH is set to "No"

  4. Make sure that VALID_ARCHS is set to "armv6 armv7"

Also, the place you see the error message is in Organizer. Select the device you're trying to run on and choose 'Console'. You'll see an error after you try to run the app.

XJones
  • 21,959
  • 10
  • 67
  • 82
0

Turns out that there are "Architecture" entries under both "PROJECT" and "TARGETS" and I was mucking with "PROJECT". Setting the "Architecture" under "TARGETS" caused it to start working.

Hot Licks
  • 47,103
  • 17
  • 93
  • 151
  • The target settings inherit from project. If you set it in target it overrides whatever the project defaults are. And... you're welcome. – XJones Nov 15 '11 at 19:42
  • Until I'd had the problem I'd never set any of them -- imported this project from Xcode 3 (where it worked fine). – Hot Licks Nov 15 '11 at 20:03
  • XCode 3 doesn't support armv7. When you convert your project to xcode 4 is when the settings change. – XJones Nov 15 '11 at 20:07