1

I am trying to test an app on my iOS 4.2.1 device using XCode 4.2 and the latest iOS SDK. The application does not have any functionality that is specific to iOS 5.0. When I run on my devide it says "Build successful" and then "Finished running app on device", but nothing is installed on my device and the application never starts. While searching here, I've found several possible solutions, none of which have worked. Here's what I've tried.

  • Resintalling all certificates and provisioning profiles
  • Setting the deployment target to the same iOS version as my device (without this, testing on device was not even available).
  • Set the "Debug" value on the Code Signing section of Build Phases to my developer certificate.
  • Someone suggested to set "accelerometer" to YES in "Required device capabilities", only I can't find such a section anywhere in my .plist file or the Build Settings.
  • ANother suggestion was to set target architecture to armv7 instead of having both armv7 and armv6. I tried with both, armv7 only and armv6 only. None worked.
  • Deleted /Developer folder and reinstalled XCode.
  • So far, the only "error" message I could find in the logs is this:

Stream error occurred for : Error Domain=kCFErrorDomainCFNetwork Code=2 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)" UserInfo=0x133cf0 {kCFGetAddrInfoFailureKey=8}

Any help will be greatly appreciated.

Anne
  • 26,765
  • 9
  • 65
  • 71
tutiplain
  • 1,427
  • 4
  • 19
  • 37

2 Answers2

0

Seems stupidly simple, but I've seen this error quite a few times with the exact setup you outlined and unplugging the iPhone and plugging it back in often seemed to be what fixed the issue. Not sure if this is specific to the iPhone 3G/iOS 4.2.1 but this error seems to be cropping up fairly routinely for me with that device connected to Xcode 4.2.

Addition: This questioner had the exact same error, which was due to a network problem because of DNS issues. You may need to check whether your iPod and/or your Mac are properly set up on your network and can access the internet. Moving on to pure speculation, perhaps there is some 'phone home' required to confirm the device is registered on the developer portal as being provisioned for development that is failing due to networking not being set up correctly, resulting in the build not working?

Community
  • 1
  • 1
Duncan Babbage
  • 19,972
  • 4
  • 56
  • 93
  • I'm actually testing on an iPod (second generation, I believe). I will try this and post back. – tutiplain Nov 13 '11 at 13:26
  • Hi again. No, disconnecting and reconnecting my device had no effect whatsoever. What else could I try? – tutiplain Nov 13 '11 at 13:41
  • I noticed that iTunes won't let me upgrade my iOS version higher than 4.2. Is it possible that my iPod is simply too old to use with this version of XCode? – tutiplain Nov 14 '11 at 17:12
  • The last version of iOS that the iPhone 3G supports is iOS 4.2.1. This will also be the last version that the equivalent generation iPod supports. I have been actively building an app to just such a device on both Snow Leopard and Lion, using Xcode 4.2 and the iOS 5.0 SDK without problems—you just need to ensure that the build target is set to iOS 4.2 or below and that armv6 is included in the supported architectures. – Duncan Babbage Nov 14 '11 at 17:36
  • Yes, I've made sure that the both the deployment target is set for 4.2 and that both armv7 and armv6 architectures are included. – tutiplain Nov 15 '11 at 00:43
  • Also: my app only reads data from a local sqlite database and populates a tableview. The questioner you linked required an open Internet connection because his app read data from a remote location (although I did see that same message in my device logs at some point). Still, my Internet connection works fine on the Mac. Haven't tested Internet on the device while connected via USB, though. – tutiplain Nov 15 '11 at 03:18
0

I finally discovered the problem. In Build settings, Architecture, while I had made sure that both armv7 and armv6 were present in the Valid Architectures section, I did not check in the "Architectures" setting, which by default says "$(ARCHS_STANDARD_32_BIT)". Adding armv6 to this section solved the problem. But I still thank u for taking the time to try and help me, it is much appreciated.

tutiplain
  • 1,427
  • 4
  • 19
  • 37