How to debug iOS app build with lower SDK on device with higher iOS - iphone

I'm using xCode 3.2.3 with 4.0 iOS SDK, but my iTouch has iOS 4.2 installed.
I could deploy and run Release version app on my iTouch, but when I try to debug app on device, the app is always running with nothing but black screen, without any response.
The problem is:
How to debug iOS app build with 4.0 SDK on device installed iOS 4.2?

If you go to Xcode's organizer you'll see that your device is actually not allowed to run the debug mode (with a development provision file), since your SDK version is lower than your device's OS. Apple just doesn't allow that to happen.
I assume that you want to keep your old SDK is because you want to check the compatibility with older OS. I would suggest you upgrade your Xcode and its SDK to the latest version (3.2.5/4.2.1) while testing your app on old and new OS devices.

Try installing the latest iOS SDK to another folder (mine is at /DeveloperBeta). That way you could continue developing and debugging using the new SDK, while still having the old SDK around to build for app submission.

Related

Launching Xcode 4.0.2 application on iPhone/iPad from VMWare

I would like to test an application on my iPhone and iPad.
The iPhone is running 5.1 and the iPad is running 5.1.1
I am getting this error:
Xcode cannot run using the selected device. No provisioned iOS devices are available with a compatible iOS version. Connect an iOS
device with a recent enough version of iOS to run your application or
choose an iOS simulator as the destination.
I have a developer's license and have followed the provisioning wizard in the Apple website members section. I've installed everything like it said (certificate, provisioning profile in keychain, etc..) but am still getting this error.
I've tried compiling it on 4.3, 4.2, 4.1, and basically all of the options that are available in the build section.
In the Xcode Organizer, my devices show up with an Orange icon next to them. This is the 'error' message on this screen:
The version of iOS on “Personal iPad” does not match any of the
versions of iOS supported for development with this installation of
the iOS SDK. Please restore the device to a version of the OS listed
below, or update to the latest version of the iOS SDK; which is
available here.
This is all on VMWare on OS X 10.6.7.
I've read the other posts where people had a similar problem and tried the solutions proposed (which were mostly comprised of trying to run on older builds) and nothing worked so far.
Notice how you are compiling with an SDK version less than the version on your devices? That's a problem. For iOS 5 you need at least Xcode 4.2 (which comes with the 5.1 SDK).

Testing on jailbroken brand-new iOS device - using Xcode?

OK. So, here's some details on my situation :
I've got a brand-new iPhone 4.
The iOS version has been updated to 5.1.1 (9B206).
The phone has been jailbroken using redsn0w.
I'm running Lion (10.7.4) and Xcode 4.3.
Now, my issue :
I'm creating a sample test app, which runs fine under the simulator.
Followed everything here, but without any result.
Also tried enabling my device via Organizer ("Use as development device").
When I click on "Use as development device", it keeps saying...
The version of iOS on “Dr.Kameleon’s iPhone” does not match any of the
versions of iOS supported for development with this installation of
the iOS SDK. Please restore the device to a version of the OS listed
below, or update to the latest version of the iOS SDK; which is
available here.
OS Installed on Dr.Kameleon’s iPhone
5.1.1 (9B206)
Xcode Supported iOS Versions Latest
5.0 (9A334)
4.3
4.2
While, when I try running on my "iOS device" (that's how it appears), it claims there's no device with a proper iOS version.
No provisioned iOS devices are available with a compatible iOS
version. Connect an iOS device with a recent enough version of iOS to
run your application or choose an iOS simulator as the destination.
Any ideas? What's going wrong?
Look, everyone who says you can't build directly on a jailbroken device is wrong. You can, and it's quite easy to do. If you don't have a provisioned device (and it looks like you don't), using this guide will work. I've tested it myself on Lion running Xcode 4.3 (it even works on later versions, but those are under NDA).
The real issue seems to be that, for whatever reason, you don't have the iOS 5.1 SDK - you're using the iOS 5.0 SDK. You can confirm this by looking in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport. If you don't see any mention of 5.1, you don't have it installed. Try downloading and installing Xcode again (I believe it's 4.3.2 now), which should have the iOS 5.1 SDK bundled with it.
This error is not due to the jailbroken iPhone, its basically due to your lower version of Xcode which doesn't support the latest iOS, try upgrading your Xcode version to latest.hope it helps

5.0 Base SDK app won't install on iPad with 5.1 OS

I have an ipad device with 5.1 OS and am trying to run a 5.0 base SDK app on this device.
here's my error:
thanks for any help.
I believe from your screenshot that you are running Xcode 4.2 with the iOS 5.0 SDK, in order to deploy to devices running iOS 5.1 you will need to upgrade to the latest version of Xcode (4.3.2) which has the iOS 5.1 SDK and will allow you to deploy your build to a 5.1 device. This upgrade will require OS X 10.7 Lion. Even though you are targeting a version of iOS supported by your version of Xcode, you can not deploy to devices running a newer version of iOS than your SDK supports.
(Lion upgrade alternative https://stackoverflow.com/a/9621226/716216)
Your device UDID is not added in the developer profile you are currently using.
Go to the developer portal, add the device to your account, add it to your development profile, download the profile again, install it and use the new profile to test the build with.
i thnk you have selected the device as target, and your ipad is not properly attatched to it. if it attched, xcode will show ipad's name
more over. make sure device is added to provisioning profile u'r using

How can I build an application for iPhone OS 3.1.2 using the current Xcode?

I have an iPhone running the 3.1.2 firmware and would like to build applications for it. However, I can't find Xcode 3.2.1 with the iPhone OS 3.1.2 SDK at Apple's developer site.
How can I build an application using the current SDK and Xcode versions that will run on this older OS version?
Use the current tools and SDK. Set the "Base SDK" build setting to "Latest iOS" and set the "iOS Deployment Target" to whatever version you want to target, such as iOS 3.1.2.
The only gotcha here is that the compiler won't warn you if you use something from the SDK that was introduced after iOS 3.1.2, and if you do your app will likely crash. So, you'll want to check the docs for each method you use that you don't already know for certain is available in 3.1.2, and you should test your app thoroughly.
Unless there is some unmentioned reason you need the older version, you can use the latest Xcode and just target the build for the old iOS.
If you are a member of the Apple Developer Program (which you need to be in order to download any version of the Xcode and iOS SDK), you can download Xcode 3.2.6 w/ iOS SDK from the main 4.3 from the iOS Dev Center home page. Under the section for Xcode 4, there's a small line saying "Looking for Xcode 3? Download", which takes you to this download page.
Of course, that still requires you to develop using the 4.3 SDK, so you have to be carefull when targeting 3.1.2 devices.
You can purchase Xcode using the Mac-App-Store or by subscribing to the iPhone Developer Program ($99 per year).
Get the latest one (XCode with iOS SDK 4.3) and select 3.1.2 for the deployment iOS Version (under build-settings).

iOS 4.3.1 on the phone - does it work with XCode 3.x ? or only 4.0.1?

I upgraded my iPhone to the latest OS (4.3.1) yesterday, and noticed there is no corresponding XCode 3.x release, only a 4.x release (4.0.1).
Since upgrading I am getting warnings when I try to install apps on the device using my development certificates (Application failed codesign verification).
Not sure if the OS upgrade on the Phone and the error message are related, so I'm just asking the question if anyone else had this happening?
And are we supposed to use XCode 4.0.1 when we develop for the 4.3.1 iOS release or can we use a 3.x version as well?
The Xcode version number isn't important, but the SDK version number is. You can get the latest SDK with either Xcode 3.2.6 or Xcode 4.0.1 at the time that I'm writing this.
You can still download the XCode 3.2.6, it goes with the SDK 4.3, and it is free to download.
You can try with XCode 4 as well, but you have to either to have an iPhone or Mac Developer account (99$/year) or you need to buy it from the AppStore
It still works, however of you first attach your iPhone to Xcode it will ask you to download the debugging symbols off the phone. Answer Yes to this question and you are ready to go.
However there is one more thing: usually Apple makes restrictions about the SDK you should use when submitting apps to the store. So if you want to submit an app it could be that you have to use the most recent SDK.
Deploying an application directly from XCode 3.2.6 on a device where iOS 4.3.1 has just been installed won't work.
First, you need to open XCode's Organizer window and ask to collect information from the device. Then it will work fine.