Building for prior iOS versions [duplicate] - ios

XCode 4.2 Build 4D199 on Lion with iPhone 3G IOS 4.2.1
Project with Base SDK 5.0 and Target 4.2.
On this phone and on older iTouch the debugger never seems to startup. After pushing RUN the project compiles and then the Debug entry is in the Log Navigator with the Spinner Running. The spinner never stops and the app does not get loaded on the iPhone 3G.
Any clues on how to fix. This was working fine before the Lion Upgrade.
Need to test the older devices. Newer devices seem to work fine.
Device seems to be provisioned fine, etc.

Probably because armv6 is missing from the architectures for the Target.
Click on your Project in Xcode, then click on the Target. Double-click on 'Architectures', and delete what's current there - probably something like $(ARCHS_STANDARD_32_BIT) - using the '-' button. Next, click on the '+' button and add 'armv7', then add 'armv6'.
Hopefully, that should help.

I found when I would start a new project in xCode 4.2 (Build 4D199) it would not build to my iPod touch running 4.2.1. While I did have to set my architectures to include armv6, that alone did not do it.
In my project's Info.plist file xCode had set "Required device capabilities" to include 'armv7'. I removed that now everything is working fine.
I hope this helps someone else.

Related

How to run old simulators in Xcode 5 [duplicate]

Xcode 5 is behaving just fine, and I'm able to build and run apps on my iOS 7 device and in the iOS 7 simulator.
However, I do want to support iOS 6.1, but I don't see any way to build and run the apps for an iOS 6 simulator.
Things wot I've done:
Set Deployment Target to 6.1 for both Project and Target
Downloaded iOS 6 Simulator
Copied the iOS 6 SDK into Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Reset Content and Settings for the simulator
Originally, I was trying to see the app in the iOS 6 simulator by switching from iOS 7 to iOS 6 in the Hardware > Device menu in the iOS Simulator application, but there aren't any apps in the iOS 6 simulator.
I'm gathering from answers like this one that there should be something I can select before I click Build/Run.
I'd love to be able to see my apps in both iOS 6 and 7 simulators. Any ideas what I'm missing? Here's a LINK to what I see when I click on the simulator dropdown.
Turns out the solution was changing the deployment target for the project from iOS 6.1 to iOS 6.0, upon which the simulator scheme selection immediately showed the option to choose iOS 6 or 7 simulators. Basically the deployment target should match a simulator version that you have installed.
Thanks to random commenters in questions like this one who mentioned that that worked for them.
All you have to do is go to Xcode -> Preferences -> Choose the "Downloads" tab and install the iOS 6.0 Simulator.
Once you're done downloading it, it should show up as an option in your schemes.
Just a little caveat....I tried what you said but it didn't work for me...
Changed Deployment Target on "Project" from 7.1 to 6.0
Then I realised that Deployment Target was still set to 7.1 on the "Target" - once I changed that it worked!
Click to target or project > Build Settings > Achitecture > Supported Plateforms : change to iOS
What I did to get mine working was click on the scheme to the left of where the Simulators usually appear in the dropdown, then choose edit scheme.
A new window will display, make sure that Run is highlighted on the left and then click on the Info tab. Choose the .app file for Executable.
If you are still looking for a solution here's what worked for me:
From the xcode beta's pull down menus, Xcode > Open Developer Tool >
iOS Simulator (if you get a pop up error just dismiss it)
Once in the Simulator go to Hardware > Device > Manage Devices.
Delete everything listed under simulator.
Reboot your machine.
After that navigate back to Manage Devices in the simulator and click the plus to add back
your simulators. Then the iOS 8 simulators will show up.
This might help u out better..you have to copy paste iPhoneOS6.1sdk folder. This is for SDK, similarly instead of iPhoneOS.platform select iPhoneSimulator.platform and then the same path.
Please check whether your "Deployment Target" is higher than the ones available on your simulators.
Xcode5 neither has 6.0 SDK or 6.0 simulator. But what you can do is u can copy both 6.0SDK and 6.0 simulator from your previous Xcodes (xcode4.5 for 6.0 and XCode4.6 for ios6.1) You can find the simulator at /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/applications/iphone simulator.app
And SDK at /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/6.0
Copy the entire folders for simulator and SDK in the exact same path of XCode5.
Note: to go the the Contents of Xcode.app just do a right click on the .app file and you will get an option"Show Contents".
Once u are done copy pasting, restart ur XCode5 and u can see 6.0/6.1 simulator as an option :)
Click on your project root.
Then Go to the Build settings.
Then set iOS deployment target 5.0
Then select iphone6 on top left of your project.
See this image
Solved restoring an older version of the xcodeproj file.

xcode 4.5 wont let me debug on ios 5.1 device

I recently got a new dev machine and downloaded the latest xcode 4.5. It came with IOS 6 only so I went and got sdk 5.0 and 5.1 from older xcodes.
The device im testing on in running ios 5.1 and I'd like to keep it that way for the moment.
In my project settings I have base sdk set to ios 5.1.
The trouble is that when I try to debug on my ios 5.1 device xcode complains that I need to connect an iOS device with a recent enough version of iOS to run my application.
How can I solve this problem?
You can surely run your app on a iOS 5.1 device when using Xcode 4.5 - I am doing that at the very present moment.
Have you checked in Xcode organizer if your device is configured for development? Go to the Organizer (one of the top-left icons), select your device from the lefthand list and click on "use for development" (if available).
Hope this helps.
I have xCode 4.5 like you and I have an iPod Touch 3G 5.1.1 which works perfectly with iOS 6 SDK.
The SDK Number doesn't tell you that it only works for that firmware.
In your Project settings under targets you can define the sdk, not the sdk you build with(this is 6.0) but youcan tell what the minOS is
Try restarting with your 5.1 device plugged in.
My iPod 5.1.1 is provisioned and has been used for development. If I choose the scheme "iOS Device" Xcode 4.5.2 refuses to run, telling me "Xcode cannot run using selected device". However it does work when I set the scheme to "robert's iPod" (or whatever). This choice doesn't show up right away when I plug the device in, and sometimes I seem to need to quit and restart Xcode and/or iTunes (or reboot) in order to see it.

XCode 4.2 and ipod 2nd generation

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.

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.

Error message when compiling in Xcode 4

As of today I can't compile my iOS Xcode project anymore. Immediately a message box pops up saying:
The run destination iPhone 4.3 Simulator is not valid for Running the scheme 'MyApp'.
The scheme 'MyApp' contains no buildables that can be built for the SDKs supported by the run destination iPhone 4.3 Simulator. Make sure your targets all specify SDKs that are supported by this version of Xcode.
I've already played around with various settings in Xcode but nothing helps.
Does anyone know how to solve this?
Thanks!
Just a wild guess, but did you have a look in your project settings under Base SDK? Does it say e.g. Latest iOS (iOS 4.3) ?

Resources