switching from xcode3 to xcode4 – can't load programs onto older iPod Touch
iPhone app does not run on old device (3G, 3GS, …)
I’ve got a similar problem to this (iPhone app does not run on old device (3G, 3GS, …)) but the workaround on that page doesn’t do anything for me. I have been developing iOS apps on XCode3 and testing on an older second generation iPod Touch running iOS 4.2.1. Been trying the last couple of days to use XCode4 instead.
I’m able to build and run apps under XCode4 using the simulator, both ones that I initially developed under XCode3, as well as brand new XCode4 created “Hello World” type ones. However, when I try to put one on the actual hardware, it fails with little in the way of error messages. The debug window in XCode4 doesn’t show anything amiss. The activity/status indicator in the top middle of XCode goes from “Building [AppName]” straight to “Finished Running [AppName]” but the app never is transferred or run on the device.
If I look at the iPod’s console via Organizer I see a bunch of errors like:
Thu Jun 16 15:17:56 unknown lockdownd <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Thu Jun 16 15:17:56 unknown com.apple.mobile.lockdown <Notice>: Could not receive size of message
and I’m guessing it’s related to that. I’ve tried unplugging all other USB devices from my Mac but makes no difference. Tried rebooting both the device and the Mac, but again no difference.
I have adjusted the iOS deployment target to 4.2, so I don’t think there’s any problem there. The device shows up in Organizer with the green dot and a valid unexpired provisioning profile. Under code signing properties it looks like:
Code Signing Entity Don't Code Sign Debug Don't Code Sign Any iOS SDK iPhone Developer (currently matches...[profile I have installed]) Release Don't Code Sign Any iOS SDK iPhone Developer (currently matches...[profile I have installed])
The device itself is showing up in the Schemes dropdown as:
[DeviceName] (4.2.1 overriding Base SDK to 5.0)
Anyone else running into a similar problem or have any suggestions?
4 Solutions Collect From Internet About “switching from xcode3 to xcode4 – can't load programs onto older iPod Touch”
Just to promote Thomas’ comment to an answer, this can be caused by targeting a CPU architecture that your device doesn’t support. The iPhone and iPhone 3G (along with iPod touches of the same generation) don’t support armv7. Set the “Archiectures” build setting to include “armv6” to ensure the resulting fat binary contains armv6 code.
I had the same problem with XCode 4.1.1 and an Ipod Touch 2nd gen. I started with one of the templates and couldn’t run it on my hardware. Found all the answers here on stackoverflow, but it’s better to have all necessary steps in one spot:
You have to add armv6 to Architectures in your project settings (Build Settings tab). You can set it to “armv6 $(ARCHS_STANDARD_32_BIT)” or “armv6 armv7”, it doesn’t matter. $(ARCHS_STANDARD_32_BIT) is just a variable which equals “armv7” in the newest XCode.
Don’t change the Base SDK, “Latest iOS (iOS5.0)” is fine. Under “Summary” change “Deployment Target” to 4.0 or whatever iOS version you want to have as a minimum version.
The newer templates in Xcode 4 have a standard setting in your Info.plist which you have to change. Search “Required device capabilities” and delete “armv7”.
If you’re doing steps 1+2 but forgot step 3, you get the “Could not receive USB message” errors in the device log and no error message otherwise in XCode. Why it does that, instead of showing you an error message that hints you to “Required device capabilities” is a different question.
In Short: Apple started to drop support for the armv6 platform with the update to iOS 4.3. Newer hardware runs with a different instruction set, armv7. If you want to support iOS 4 with XCode 4, you should really make sure that you also build your project for armv6 correctly with the steps above.
It looks like you have iOS 5.0 SDK installed. Am I reading that right? If so, that is governed by Apple Developer NDA and should not be discussed here. I would post in the developer forums.
Do you have other devices running 4.2.1 that DO work with your installation of Xcode? Do you have any other devices at all that DO work with your installation of Xcode?
Please be aware that apparently the architecture setting is case-sensitive.
I manually added ‘Armv6’ and nothing still worked.
Changing this to ‘armv6’ did the trick.
- “The binary you uploaded was invalid. the file was not a valid zip file” Error message uploading app to iTunes Connect
- Swift3 Random Extension Method
- Why does my Cordova WebView have an extra 20px of scrolling?
- Do i need to Enable WAL mode to copy .SQLite from bundle to Document directory?
- '#selector' refers to a method that is not exposed to Objective-C
- Make Ionic app appear in “Share” list and receive data
- ELCImagePickerController does not back to viewController in swift
- “Cannot assign value of type 'String' to type 'AnyObject?'”, Swift 3, Xcode 8 beta 6
- set a delegate for UIWebView
- Duplicate symbols issue with 2 third party libraries in Xcode
- Xcode — Sharing files between targets
- 'Found an uxexpected Mach-O header code: 0x72613c21' when trying to export an archive to IPA.
- Empty white space above UITableView inside a UIView
- Custom Tab Bar Controller with Navigation Bar
- Screenshot app that can take screenshots in any view