3

I'm trying to run for the first time an app in a device.

  • XCode 4.2
  • iPhone 3G 4.2.1

  • I have a provisioning profile showing under Xcode organizer installed with a wildcard app identifier (DQQVZJ94G3.*).

  • The device lists in XCode organizer.
  • I have certificates installed in my Mac keychain and they show the private key.

  • I have created a new project from template and didn't add a single line of code.

  • I have set iPhone as my schema.
  • I have set under Build Settings->Code Signing->Code Signing Identity->Debug->Any iOs SDK-> the iOS Development Certificate/Provisioning Profile pair.
  • I have set the tagert deployment target as 4.1.
  • I have set Bulid Settings->Architectures to Standard(armv6)
  • I have removed from plist file "required devices capabilities"->armv7

All the previous settings are set up in the Target settings.

  • I have realunch xCode and reinstalled certificates and profiles.

Whenever I hit Run, I just get "Finish running myApp on iPhone", but nothing happens, not even a log to get a cue of what's happening.

David Casillas
  • 1,801
  • 1
  • 29
  • 57
  • Does "required devices capabilities" contain any other keys? Also, when you select the device in Organizer and go to its Provisioning Profiles pane, does it show provisioning profile without any warnings? – sch Feb 26 '12 at 09:51
  • It has no keys. No warnings in Organizer. – David Casillas Feb 26 '12 at 09:51
  • [Here is a question about an iPod touch running 4.2.1.](http://stackoverflow.com/a/8697335/927947) But it sounds like you've already done everything listed. I have sometimes seen the `Target` & `Project` settings get out of sync, so check the architectures property in the `Target` > Build setting > Architectures as well. The `Target` settings will override the `Project` settings. – NJones Feb 26 '12 at 10:12
  • All settings are Target settings no global Project settings. – David Casillas Feb 26 '12 at 10:17
  • Try to set **Architectures** to **$(VALID_ARCHS)** and **Valid Architectures** to **armv6 armv7**. – sch Feb 26 '12 at 10:22
  • @sch That give me a build error: "/usr/bin/lipo: /Users/david/Library/Developer/Xcode/DerivedData/Blank-afkteinjtyamljfcihyctenfzqdr/Build/Intermediates/Blank.build/Debug-iphoneos/Blank.build/Objects-normal/armv7/Blank and /Users/david/Library/Developer/Xcode/DerivedData/Blank-afkteinjtyamljfcihyctenfzqdr/Build/Intermediates/Blank.build/Debug-iphoneos/Blank.build/Objects-normal/armv7/Blank have the same architectures (armv7) and can't be in the same fat output file Command /usr/bin/lipo failed with exit code 1" – David Casillas Feb 26 '12 at 10:26
  • Did you set **Valid Architectures** to **armv7 armv7** instead of **armv6 armv7**? I was able to reproduce the error when I did that. – sch Feb 26 '12 at 10:30
  • NO. Anyway, I started another project from scratch, set everything as indicated, same result. If I set Architectures to $(VALID_ARCHS) the value displayed is ARCHS = $(VALID_ARCHS) Standard(armv6) $(ARCHS_STANDARD_32_BIT) but I get the same build error as before. Maybe this is a clue to the problem? – David Casillas Feb 26 '12 at 10:35

3 Answers3

4

Build settings are duplicated: there are project build settings and target build settings. Generally, if you change the project settings, the target settings are automatically changed, and this is useful if the project contains multiple targets. But sometimes, that doesn't work and you have the manually change the target settings which are the actual settings used to build the target. So start with that and verify that the target settings look like this:

  • Architectures : $(VALID_ARCHS)
  • Valid Architectures: armv6 armv7 (default value)
  • iOS Deployment target : iOS 4.2.1 or lower

If that doesn't work, then the problem is probably that the provisioning profile isn't correctly setup. An easy way to make sure it works correctly is to make Xcode manage it for you. So remove the provision profile from your device and from Organizer, also remove the developer profile from Organizer. Then plug the iPhone, right click on it in Organizer and select: Add Device to Provisioning Portal.

Edit

Make sure you remove the other values in Architectures. For example, in the screenshot below, you have to remove the selected line armv7.

enter image description here

sch
  • 27,436
  • 3
  • 68
  • 83
  • I have tried both methods, adding the provisioning profile via xCode or via the portal and import to xCode. I have updated the post to show that all settings are target specific. – David Casillas Feb 26 '12 at 10:21
  • @DavidCasillas - I think your problem is that you did not remove the old values in **Architectures**, keep just **$(VALID_ARCHS)**. In fact **$(VALID_ARCHS)** is equivalent to **armv6 armv7**, so you are duplicating **armv7**. – sch Feb 26 '12 at 10:41
  • You get it. Thanks for the good job. I will not get to it myself. – David Casillas Feb 26 '12 at 11:03
0

I added armv6 as described in the other answer, then under Target, I had to remove "armv7" from "Required device capabilities"

click the hyphen to remove armv7

Thunder Rabbit
  • 5,405
  • 8
  • 44
  • 82
0

I had the same problem and my solution ended up being that I didn't have my iPad's device ID added to my devices list.

jblaker
  • 147
  • 4