XCode 4.2 and ipod 2nd generation - ios

I'm trying to run my application on my old 2nd generation iPod Touch running iOS 4.2.1 to test it on a non-retina device.
It seems that I have all the certificates and provisioning profiles setup properly, everything works with my iPod Touch 4th generation running iOS 5.0.
However, it neither shows my app on the iPod's screen nor the iPod's installed applications list in Xcode. Without any explicit warning from Xcode.
Could you tell me if I should downgrade to Xcode 3 in order to run and test my application on the old device, or am I doing something wrong? Where should I check?
Thanks!

#borrrden is correct that such a device is fine (just tested on one myself, in fact, using Xcode 4.3.x).
My first guess (though it seems odd you wouldn't get an error) is that you are only building for armv7, which at some point became the default in Xcode (don't recall whether this was in 4.2 or 4.3). You need to make sure that your "valid architectures" and related build settings include both armv6 and armv7 if you are targeting that range of hardware.

Related

Why this alert? "App installation failed, This application does not support this device’s CPU type" [duplicate]

When trying to build and install an application on an iPod running iOS 4.2.1, I'm seeing the error
This application does not support this device's CPU type
I'm trying to build the application using xcode 4.3, as well as xcode 4.4, and still seeing this. What can cause this and how can I fix it?
I have encountered such a problem today on iOS 11.2.1 with iPhone 7 devices.
The reason is that the previous project set up a 32-bit architecture that is no longer supported.
And I solved the problem as follows:
Project -> Build Settings -> Architectures value should be set Standard architectures - $(ARCHS_STANDARD)
From the project build settings -> Architectures, make sure you have both armv6 and armv7 values.
Also, you can check your Info.plist file, under Required device capabilities. If there's armv7 there, remove it.
If you are getting this error building Unity 3D application, change scripting backend to IL2CPP, and select "Universal" architecture.
This post led me to my answer. Thanks #adig and #masam
I have an iOS 8.4 enterprise signed app that would only work on certain device types when I tried to install it from our internal app store, and it was inconsistent. I wasn't getting any helpful error messages, even from the device console, until I tried to deploy it using the XCode Devices to a 5th gen iPod. It said "This application does not support this device type" which led me to here. I was debugging on a 6th gen iPod/iPhone 6.
I was archiving from a different scheme than I usually release from and I was only building the current architecture which meant that it would only work on a certain type of device depending on what was plugged in when I archived.
So make sure that "build active architecture only" is NO when you are archiving an app to sign as an Enterprise app.

Minimum iOS version support for RoboVM

I just tried launching an App I'm building with RoboVM on my iPod Touch (2ng gen) using the "iOS Device App" launch configuration. It did a full build for the "thumbv7" target, uploaded some files, and during the VerifyingApplication step, it stopped with the following message:
'Launching ...' has encountered a problem.
An internal error occurred during: "Launching ...".
DeviceOSVersionTooLow
My iPod is running iOS v4.2.1 (8C148) and my app (at least the parts I wrote) only use functions available starting iOS 3.1 or earlier (CADisplayLink is the most "advanced" feature I use).
This leaves me with the following questions:
How are the iOS version requirements for my app determined? Is it specified in some config file (commenting out the UIRequiredDeviceCapabilities section in Info.plist.xml didn't help) or does RoboVM analyze my code and figure it out from there?
Does RoboVM itself have a minimum version requirement? If so, can I tweak it somehow?
After some more digging and testing, I have now come up with (what I believe to be) a practically complete answer to this question.
A quick disclaimer: I am still using RoboVM v1.5 and Xcode v6.4, since they work beautifully for my needs and I'm a strong believer in "if it ain't broke, don't fix it". So, some info here may be outdated.
There are two factors at play: Support for a specific device platform (ARMv6, ARMv7, ...) and support for a specific version of iOS.
RoboVM dropped compiler support for ARMv6 pretty early on, so other than compiling a version of an app with an old installation of RoboVM, there is not much that can be done to support ARMv6 devices now-a-days.
iOS version support is more flexible than that:
As of v1.0 beta 4, RoboVM's Info.plist.xml supports an entry called MinimumOSVersion like:
<key>MinimumOSVersion</key>
<string>5.0</string>
This entry determines whether the app is allowed to be installed on a device or not. If you set it higher than the device OS version and try to execute the app on the device, you will get the following error message during launch:
Launch failed. Check the RoboVM console for more information.
DeviceOSVersionTooLow
As such, I assume that this setting also determines whether the app is offered in the iTunes store for a specific device.
If you do not specify this key, it used to default to 5.0, but to fix some issue with XCode 7, the default was changed to 6.0 in September last year.
Note that this setting obviously does not guarantee that the app will run on a given device.
So much for the theory. Now for some actual experiments:
I was able to downgrade an iPhone 3GS to iOS v4.1.1 and tried to run the simplest possible RoboVM hello world app on it with MinimumOSVersion set to 4.1. The app would install fine, but would crash immediately without any debug log to the Eclipse console when launched. After upgrading the phone back to iOS v6.1.6, the app runs fine. So, v4.1.1 (and likely lower) is not supported any more by RoboVM v1.5 (and higher, I'd assume), even on an ARMv7 device.
I also got my hands on an iPad 1 running iOS v5.1.1, i.e. the latest available version of iOS for this device. With MinimumOSVersion set to 5.1.1, my full game app installs and runs fine on the device. But, when RoboVM tries to launch the app from the IDE, the launch fails with the following exception after installing the app on the device:
AppLauncher failed with an exception:
java.lang.RuntimeException: Launch failed: Unexpected response '' to command 'QListThreadsInStopReply'
at ...
I can run then the app by clicking its icon, though, and it works without a hitch, just debugging it (like seeing System.out in the Eclipse console) doesn't work.
Conclusion:
By setting MinimumOSVersion to 5.1.1 in Info.plist.xml, RoboVM v1.5 paired with Xcode v6.4 can support all iOS devices with an ARMv7 or better processor, provided they run iOS v5.1.1 or better (iOS v5.1.1 is available for all ARMv7 or better devices).
So, this setup can support all iOS devices released in 2009 or later, which only excludes the first two iPhones (1 and 3G) and iPod Touchs (1st and 2nd gen). iPhones can be supported starting with iPhone 3GS, iPod Touchs can be supported starting with the 3rd generation and all iPads can be supported.
For a great overview of iOS devices, you can take a look at the iOSSupportMatrix.
As Mario Zechner explains in the linked post, RoboVM supports iOS 7 and up at this time, and can also informally support iOS 6.
https://groups.google.com/d/msg/robovm/u6hk8kSFfuY/XEtQayXW6_sJ

My iPhone 3Gs isn't selectable as a target from Xcode5. Is this fixable?

I've been trying to get my iPhone 3Gs targeted so I can test applications on it for two days now, and I am ashamed to admit I haven't achieved this goal yet. I've found the following sites and stackoverflow answers (below), but haven't been able to target my 3Gs. During this time I am able to target my iPhone 5 with ease and put applications on that phone. I do have the iOS team provisioning profile for both devices, and on my organizer window they both show with green dots next to them.
Visually, what I mean is the following:
My iPhone5 is selectable, but my 3Gs doesn't even show up.
So far what I've found is the following answers and sites:
1) http://www.mobinett.com/2013/09/20/ios-7-xcode-5-project-build-settings-for-architectures-and-arm64-support/ --
Discusses how to target armv6 which is what the 3Gs is. I executed this, but under the target selection was unable to see my 3Gs as selectable. You can see in the photo that I switched the Valid Architectures to include armv6, and chose Architectures to just be armv7 and armv7s.
2) Is it possible to install iOS 6 SDK on Xcode 5? -- I have downloaded the 6.1 simulator in the preferences download section, and I have downloaded the 6.1 SDK and put that in the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs folder. Which you can see selected in the photo.
3) Xcode 5 does not see devices with ios 6.1.3 -- This has the same problem I'm having, but even with those actions I cannot select my 3Gs, which the actions are the same as #2.
With digging through all of these sites and questions I did find some information that apparently on Feb 1st. 2014 there was a switch in the app store where they are no longer accepting applications designed for iOS 6.1. Does this mean that I am no longer allowed to use my 3Gs to test? Or even allowed to develop for the 3Gs any more?
Help please?
I have achieved a solution. I was playing around with it some more and quit and restarted Xcode 5.0.2 without any iOS device attached to my computer. When I selected the target selection button I noticed that there were two iOS devices listed there as seen in the following picture. This suggested to me that it actually was recognizing my 3Gs, just not when I had it connect. My guess is it wasn't recognized because Xcode read that it was running iOS 6.1.3. With Putz1103's suggest that there are two version settings I started digging. Putz1103 was partially correct, and I think you for the inspiration.
Under the "General" tab, three tabs to the left of the "Build Settings" tab when the project is selected in the project navigator there are options that need to be set correctly. Under this tab in the Deployment Info section the Deployment Target needs to be selected to the correct iOS target. After selecting that my 3Gs was selectable as the target, and I was able to build my app on my 3Gs for testing.
Combined with all of my activities outlined in the original question, it is still possible to select a 3Gs as a target for development in Xcode 5.0.2 after Feb 1st 2014.
Change the Deployment Target of your App (not the project) to older or equal to the OS version of the phone will solve that.

Xcode: App builds, but "runs" and "finishes" at the same time

I have an app created from sample code I found online. I hooked up my iPod touch 4G to my computer and everything worked fine, app ran.
Then I hooked up my iPhone 3G to the computer, established provisioning profiles, etc. In the organizer the device shows up as a green dot, so we're good. The name of the device is right there next to the run button so that's a good sign. But when I hit run it says "build succeeded" and then goes directly to "finished running on " but nothing shows up on the app!
I've tried this with several apps now and all work on iPod touch, but none on iPhone.
Devices are running newest operating systems, 4.2 for the iPhone, Xcode version is the newest.
I had a different question with more than likely the same answer
App built with Xcode 4.2 ios 5.0 crashing when installed on iphone with ios 4.3.5
I found the solution here
Is it possible to target older iOS versions when using Xcode 4.2 and iOS 5 SDK?
by mmorris
I had to do what he clearly explained and 1 more thing:
Set the compiler in the Project and Target Build Set to LLVM GCC 4.2
That got the app running on my older devices
I had problem to run on simulator not on device.
Tried above options but didn't work for me.
Finally, Just Resetting Simulator did the trick.
Make sure you are targeting the least iOS version and SDK that you can in the build profiles (targets, summary, Devices, Deployment target). Also, check the error console (All Output) at the bottom right and see if there's some kind of problem occurring.

switching from xcode3 to xcode4 - can't load programs onto older iPod Touch [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
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[16] <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[16] <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?
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.

Resources