How to test iOS 5.0 app on Xcode 4.2? - iphone

I can change my deployment target from 3.0 to 4.3 and test that my application is compatible with all these versions but how can I test if my application is compatible with all versions including iOS 5.0? Any idea regarding the same? Also note that I have iPhone 3GS with iOS 4.0.2 and need to test in iOS 5.0. Hope to get a good help. Thanks.

Eventually, you'll need to get a device that has iOS 5 installed. Without that, you can only test this in the iOS 5 simulator.
Also note that changing the deployment target is not enough to test if your app is compatible with that OS version. Basically, this just means that you promise that it'll run from this version upwards, but it doesn't enforce that you don't use any APIs that might not be available there.

I you wanna do it properly, you will have to get every device there is, with every version you want to support ... that is, imho, overkill. I just test my Apps on the 4.3 and 5.0 Simulator in XCode and on my 5.0 iPhone 4. And have not had any problems with that 'til now.
BTW you should update your 3GS to 5.0.1.

To test in the simulator with iOS5, you can set the OS version with the Version submenu of the simulator's Hardware menu.

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.

Making iPhone App iOS 5 Compatible

I have developed the app using Base SDK 4.3.
I want to make sure my app is iOS 5 compatible.
In that case, should I change my base SDK to 5.0 or keep it at 4.3 and test it in iPhone 5 Simulator?
Please let me know.
Thanks!
Here is what I have done on mine:
Once you installed the latest version of xCode 4.2, you can't go back to SDK 4.3.
A. So Base SDK will be set at SDK 5.0.
B. If you still want to support iOS 4.3 devices then set your "iOS Deployment Target" to iOS 4.3 or whatever minimum version you still want to support.
C. Now you can test your app on Simulator/devices with iOS 4.3 or whatever minimum version and iOS 5.0 as well.
If you change your depoloyment target to 5.0, your app will be only available for devices that run iOS 5.0. Keep it at 4.3 (edit: sorry, you're talking about base sdk here, but still leave your depoloyment as is) and test in the iOS 5 Simulator. You should definately do the same to a device with iOS 5.0 as well! (Your base sdk is not relevant in your case -- change it to 5.0 if you need to use APIs from 5.0)
More about deployement targets here.
First of all if you want to make sure test on a real device instead of simulator.
Second, you should compile for iOS 5.0 and check any errors/warnings.
Third, you can set iOS Deployment Target for 4.3 and test on 5.0 simulator

Publishing iPhone app that supports iOS 3.1 plus

We are about to issue version 4.0 of our iPhone app and have had some complaints recently that previous versions are only available from iOS 4.1 plus. I know that to change this I can set my Deployment Target (In Project>Build) to iOS 3.1. However, I've run through the app on an emulator and again on my iPhone (uses iOS 4.2) but I'm not able to test on anything older as everyone here has the same iOS or 4.3. Can I safely assume that just by changing the Deployment Target and testing the app on later models that the app will run safely on later versions like 3.1.
We are familiar with the reason why people with older iPhones wont upgrade to iOS 4.0 and above, so we would like to accomodate them but not if it means the app is unsound and we have no way of testing it.
No, just because it compiles and runs on newer version of the SDK does not mean that it will work on older versions. If you're using features that are only available in iOS 4+ you'll need to check for their existence before using them; your app will crash otherwise.
There are some subtleties that you'll probably miss the first time too (or at least I did). In short, there's no real alternative to testing.
for the problem you have you need to install older versions of xcode having ios 3.0 support and you need to check whether it's working on the same or not as there are lots many changes in os 4.0 and above so it's definite that the application will not work with the ios 3.0, 3.1 available device and it will crashed.
Just install older version of SDK and test on simulator , if works then fine else you need to make code according to ios version 3.0 and ios version 4.0 in your code by differentiating the os and run the code accordingly.

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.