Debugging iPhone 3GS xcode 4.2.1 - iphone

I recently upgraded xcode to 4.2.1 (with macOS 10.7.3).
I have two iphone which one is 4GS and the other is 3GS. And when I upgraded both phone to iOS 5.1, 4GS works well but 3GS not works with following error message.
The version of iOS on “Test iPhone” does not match any of the versions of iOS supported for development with this installation of the iOS SDK.
xcode says it support from iOS 5.0 (9A334).
And I want to know if this is from my mis-configuration of device or officially iPhone 3GS is not supported yet.
Is there anyone who suffers similar problem ?

Well, you may want to go to xcode 4.3.1, which was released recently along with the 5.1 SDK.
After the installation you will have to re-install simulators for older iOS and debug support for older devices respectively even older iOS versions.
Out of the top of my head: In the top left corner of xcode in the drop down list where you select your build target and the targetting device/simulator there should be some menu item "install more simulators" or so. Click on that and follow the GUI. It is quite selfexplaining but the downloads may take some time.

To develop in iOS 5.1 you have to upgrade sdk to latest one. I cant understand how you'r 4Gs worked fine

Related

can app(target os below 4.3) run on ios6

Just wonder if the app(target os below 4.3) can run on ios6.
xcode 4.5 can not build the target below 4.3, does this mean ios6 does not accept app with os target below 4.3?
Welcome any comment
Almost all apps built for older iOS versions will be able to run on future iOS versions. However, you will have difficulty building older iOS apps to newer iOS devices. Also, be careful when you release. I had been working on one of my apps in iOS 4, and it was rejected for crashing. I updated my xcode and realized some of the old code didn't work in iOS 6.
an app targeted below 4.3 should be able to run on iOS6 devices as long as the app is built with an xcode less than 4.5. at least that was the case with an app I work on and it didn't seem to cause any problems (that i'm aware of). the difference is if you want to update that app using xcode 4.5 you'll have to change the target build to at least 4.3.

How to get the iPhone 4.x simulator in xcode 4.2?

i have installed xcode 4.2. In toolbar, schemes section, shows only iPhone/iPad 5.0 simulator.
what i have to do in order to see other platforms simulator like 3.0, 4.2 etc.
Go to Preferences->Downloads, there you can download older versions of the Simulator. It only offers 4.3 though, i doubt that older ones are available for Xcode 4.2.
Edit: There seems to be no official information about this but many users in the Dev Forums claim that older simulators are indeed unsupported with Xcode 4.2.
You can't by any easy way. I was hopping the debugging symbols package in Preferences -> Downloads would do it, but no.
The alternative is here: Xcode 4.3 and iPhone Simulator 4.2

iPhone 3.2 simulator

I'm working with a legacy app with a deployment target of 3.0. I have a crash being reported on iOS 3.1.3 for iPhone. In xcode 4 the only 3.x simulator I see listed is iPad 3.2
How do I test iOS 3.1.3 for iPhone?
See Install xCode 3.2.3 w/ iPhone SDK 4, get "Base SDK missing", can't see other SDKs for an extended discussion of this topic. Also, links to older Xcode and iOS SDK versions can be found at http://chris-fletcher.com/2010/08/28/howto-install-iphone-sdk-2-0-3-1-for-xcode-3-2/.
Buy a used iPhone or iPod Touch that has 3.1.3 installed and don't update the iOS on it. I have a 3G with 313, no cell service and just use it for testing on wifi. This is also useful to see check what the performance is like on a slower phone.
However, many 3.1.3 crashes are caused by using a 4.0 API call or object that is only in 4.0. You can find those problems on the 3.2 simulator.
It's not possible actually with Xcode4. If you can get old version of Xcode3.1 with iOS SDK 3.1 and install it side by side with Xcode4 then it may be possible.

iOS Development: How can I run my iPhone 4.2 app on the iPhone 3.2 simulator?

I'm diving into iOS development and I'm building a simple app that will support iOS version 3.2 to 4.2. I've tested it fairly well in the latest version of Xcode on the 4.2 simulator, but I would like to also simulate it running on a iOS 3.2 device. After reading a few tutorials on this, I managed to download and install an older version of xcode along with the older 3.2 SDK, but when I build my project in the older version of Xcode, I get a ton errors due surrounding all the iOS 4.2 functionality that the older version of Xcode doesn't support. I'm weak-linking all the 4.2 frameworks, but I'm still getting errors. How can I get my 4.2 app to build successfully in this older version of Xcode and get it to run in the 3.2 iPhone simulator?
Thanks so much for your wisdom!
You need to add #ifdef __IPHONE_4_2...#endif around any lines that reference features that only exist on 4.2. That way the 3.2 compiler will build your app as if those lines don't exist.
You need to be extremely careful to structure these statements in such a way that they exactly mirror the bits of code that would be disabled when running the built-for-4.2 build on 3.2, otherwise there's not a lot of point.
This will build your app without any of the 4.2 functionality included, so it isn't actually testing whether your weak-linking etc is correct, it's just testing how the fallback 3.2 code works.
It will probably throw up a few warnings about features/methods you didn't know didn't exist in 3.2. Make sure these have appropriate fallback code added.
(btw Apple has been known to reject iPhone apps with a Base SDK of 3.2. You need to support at least 3.1.3 if you go back before 4.0)
Did you select the option of setting the base SDK to 3.0 or others?Because by doing so you can run the new APIs available in iOS 4.2 on older OS also.
Cheers
On the second issue, of actually running it in a 3.2 version of the iPhone within the iOS simulator: I've struggled with this -- Xcode 4.0.2, set my deployment target to iOS 3.2, set my project to iPhone only, but when I try to run in the iOS Simulator under version 3.2, the simulator morphs into the iPad simulator, even if it had been running as an iPhone simulator until I selected the version number.
This frustrated me for a while. But I read this and it made sense:
http://en.wikipedia.org/wiki/IOS_version_history
The iPhone never ran 3.2; that was an iPad-only release. So, even though the Hardware > Version menu in the iOS Simulator lists 3.2 (7W367A), presumably that setting is only intended to be compatible with Hardware > Device > iPad. The simulator is enforcing this rule when it switches me into an iPad simulator. It makes complete sense.
So I'd need a 3.1.3 simulator, or older, to run my app as if running on a 3.x-generation iPhone. This isn't available in my Xcode 4 build, so it makes sense to me now that I'm just unable to do anything about this, short of putting older Xcode builds on my machine.
I think the right way to do is as follows:
1.If you are developing for version 4.2, then you must be having Xcode version 4.2 installed.
2.While building your application on devices 4.0 and 3.2 OS, select base SDK to 4.2, and deployment target device to the minimum version you want to support, say 3.2. This will make your code compatible to lower version and your application will be loaded on lower versions.
Also to support new APIs in lower versions you may follow the link :
http://www.marco.org/1648550153
I hope this helps you
You can run both 3.2 and 4.x simulators in the latest Xcode (not at the same time, of course!). You have to set "Base SDK" to 4.2 and "iOS Deployment Target" to 3.2. Now you can select the 3.2 Simulator (or later) from the "Overview" popup menu in the top left corner of the project window. Also you can select the simulator version in the iOS Simulator app itself, via the "Hardware->Version" menu item.

downgrading iPhone 3GS iOS4 to OS3

I'm working on an iphone project for OS3.1.3. I updated my iPhone to iOS4 and now I can't test my project on my iPhone anymore. I tried downgrading but get "device not eligible"
What should I do now?
If I download latest XCode SDK4 will I be able to recreate my app so that it runs both on OS3 and OS4 ? It has no specific os4 features.. it should just run on both and want to test it on real iphone with os4..
Greets
First of all, downgrading your phone won't work. at least not with the "official" approach. I think once there is a Jailbreak for iOS4, downgrading your phone should be possible again.
Secondly, Creating an iOS app with XCode SDK4 that runs on your 3.x devices is no problem at all:
Just set the "iPhone OS Deployment Target" Value (Target -> Info -> Build) to "iPhone OS 3.0"
You can build with SDK4 and still target older devices running iOS 3.2 or earlier. How to do this is covered in detail in this other question here.
You can downgrade your phone OS, that's covered in this question over here.
But really the best approach is to update Xcode, compile with SDK4 and support earlier iOS versions as well.
I'm in the same situation.
What is the best ?
1 Upgrade to SDK4 and still target on IOS 3.xx . Will iPhone ios 3.1.3 users be able to download apps built with SDK4 . I don't think so.
2 Downgrade ios4 to ios3 and still work with SDK3.
PS : Someone suggested to get the lastest SDK
You can downgrade iPhones, iPod touches and iPads.
Instructions are here. If for instance you're downgrading a second generation iPod Touch from iOS4 to iOS3.1.3 you'll need the iPod2,1_3.1.3_7E18_Restore.ipsw firmware. A Google search will bring these things up.
Some downgrading references ask you to modify a "hosts" file. I don't think this is necessary, I downgraded from iOS4.2 to iOS3.0 (and to iOS2.0 for fun) without having to do this.
Good luck.