Testing iPhone Software on Different Versions Of OS - iphone

Before submitting my app I want to test it on devices with the full range of iPhone OS available. So, I have 2 questions that I am struggling with and would greatly appreciate any help or advice.
What versions of the OS are in use?
I know that the App Store will only accept apps for 2.2.1 and 3 but all the features I'm using have been available since 2.0. Is it safe to assume that everyone is running at least 2.2.1?
Where can I find the other OS disk images, so that I can do the test?
The iPhone Development Guide (p43) says search the developer website but I can't find them.
Searching the internet just seems to throw up jailbreak sites.
I can see some dmg files that were installed with the SDK at:
Macintosh HD/Developer/Platforms/iPhoneOS.platform/DeviceSupport/x.x
but XCode Organizer ignores them.
Any help or advice would be greatly appreciated.
Many thanks in advance.

If you just need to test it on the simulator (which is a good approximation of the actual iPhone OS as far as API's are concerned) you can change the OS version by going to Hardware > Versions and selecting your version on the iPhone Simulator app. For me, I see 2.0, 2.1, 2.2, 2.2.1 and 3.0.
Edit: Here's a site that has older versions of the iPhone firmware:
http://www.felixbruns.de/iPod/firmware/
Theoretically you can just "restore" to these older firmware through iTunes, although I haven't tried doing it myself.

What versions of the OS are in use?
Unfortunately this information isn't readily available. I'd love to know. It's clear that virtually all iPhone owners will have moved to 3.0, since it's a free download and there's no good reason not to. For iPod touch users it's not quite as clear, but my guess is that a good chunk of them have not upgraded. I would speculate that there is a strong correlation between the people who have upgraded at the kind of people who pay for applications, but speculation isn't necessarily a very good business case!
Where can I find the other OS disk images, so that I can do the test?
If you want to be all official and above board, you actually can't downgrade an iPhone or iPod touch to an earlier OS release. There are ways of doing it but I can't tell you what works and what doesn't as I've never tried.
The way I do it is test on my handset which usually has the last released version or a late beta. I then use the Simulator and my beta testers to check out how it works on older versions.

Related

I am using Xcode 3.2.5. I have iAds running. Confused about about targest, iOs versions

Trying to keep up with the curve. I'm reading almost too much and is sending me in a tail spin. Is there a one stop link which will tell me what my target should be to run my app on all platforms based on what frameworks I have included? I make heavy use of Mapkit, and want to include iAds. My current apps seem dead on 3G.
Does Apple force you to support only the latest iOS? I have no problem with that, but not sure if someone who has and ancient 3G, how do I tell them, NO I don't support your phone, please upgrade?
Set your project's base SDK to the latest version of the SDK. Set the deployment target to the oldest version of the OS that you plan to support. You can use features introduced in versions later than your deployment target, but you'll need to check for them before you use them, else your app will crash.
Read the release notes for each version of the OS to get a good idea of what features were introduced when. In fact, make it a habit to read the release notes thoroughly each time a new version comes out.
iOS 4.2 runs pretty well on an iPhone 3G, so there's no need to drop support for the 3G anytime soon. If your apps currently don't work on the 3G, fire up your debugger and figure out why. What version of iOS are you running on that device? Where does it crash? This is typical debugging stuff.

iPhone App Run Different iOS

I am getting a fat binary when I go to upload, and I want to make sure that my application can run across 3.0, well even 2.0. Is there a specific way to make sure that this will show when I go to upload. I am not using any specific iOS 4 features, and I only have iOS 4 in my xCode. How can I test different iOS version?
The only way as I could think of is test your app on real old OS version devices. Since Apple prefers its users to upgrade to new OS version as soon as possible, they don't actually provide an official way for developers to test such backward compatibility.
Another relevant questions would be, "can I downgrade my device OS version to an old one, so that I can test my app on them?" I once did a research on SO and other Apple forums, and the result I got was NO, we developers don't have a way to "officially" downgrade our device OS version. Yes there are exceptions, you can try jail-breaking and then downgrading.
For jail-breaking / downgrading your OS version, check this post, A TimeMachine taking my iDevice back to 3.1.2? .
Edited: It's actually pretty easy to make sure that users with old OS versions can downloaded and install your app. All you need to do is set the Deployment Target in Xcode to the lowest OS version you want (iOS 3.0 would be the lowest in Xcode 3.2.5).
However, you need to bear in mind that such Deployment Target only ensures that your app can be downloaded and installed on such old version OS devices. They don't ensure compatibility during runtime. You still need to test your app on real old OS devices to ensure compatibility.
I dont think u need to worry about app version 3.0 below because it is not supported anymore. but how to test on different version, make sure change the iOS deployment target as Thomas refered.
There is no currently supported way to do this.
No current Simulator or Xcode tool will ensure that an app is completely compatible with an OS version older than the SDK used. The 2.0 SDK is not compatible with the current development tools. There is no officially supported way to downgrade a device.
Furthermore, Apple no longer even accepts app submissions that have a deployment target lower than 3.0.
Even most old 1st gen devices, if you can find one on eBay, have been upgraded to iOS 3.1.3. But if you have access to an old device running iOS 3.1.3, you can use that for testing. Many developers keep an old used iPod Touch around for just his purpose.
People with devices running something older than 3.1.3 are not only a really tiny percentage of the installed base, but are very unlikely to be still buying apps for that device. Even large developers with staff and legacy hardware available for this testing rarely waste the time on this market.
Look into Project -> Edit Project Settings -> iOS Deployment Target: 3.13. And then build?
Edit according to comment: You still need to ENSURE your code is within the runtime scope, i.e. do checks like 'respondstoselector' before calling methods in question.

iPhone OS 4.0 backwards compatible with 3.1/.2

I'm building an iPhone application with a base SDK target of 3.1.x. I've got a friend who offered to test it on the OS 4.0 beta, but I'm wondering in advance if I should bother. Will my application run under 4.0 or is it not backwards compatible? I have to imagine it will since apps built for 2.x run on 3.x just fine AFAIK. Any gotchas?
This information is still under NDA and therefore cannot be discussed here, except what was mentioned at th keynote and is thus public.
That said...
I can see the announced multitasking as a gotcha in terms of memory, performance and application state. Testing on OS 4 seems like a good idea in light of that. However, I your friend's device is not a latest-gen hardware device (iPhone 3GS or iPod touch 3rd generation), you will not get test results that deal with multitasking.
Also, remember that when installing the iPhone OS beta, you will need to add your friends UDID to your list of testing devices in your devloper portal or else the device will lock up when you upgrade.
In case you or someone reading this needs to know:
To upgrade, you can either use XCode's Organizer or simply use iTunes. Hold the "option" key and click on the "restore" button. A window will pop up asking you what firmware to use.
Again, thes kind of questions are not yet really legal outside of Apple's develope forum.
I hope this helps. Good luck and happy developing!!
I've been using 4.0 beta for a few weeks now, and haven't run into any problems with my / App Store OS 3 apps. I don't think there were any changes in OS 4 that would break existing OS 3 apps but I can't say so with complete certainty.
Most likely any features from 3.0+ will be in 4.0. Features in 2.x may be removed.
No way to know for certain unless you can use the beta or wait until the official release.
You should always test on as many devices as possible. As mentioned, OS 4 is particularly good to test with just to make sure you interact well with the new multitasking features (which is public knowledge so it's not like saying anything about that would go against the NDA).

iPhone 2.2.1 to 3.0 Transition Best Practices

Apple is now requiring app developers to submit apps that target 2.2.1 but also build for 3.0. I (and I imagine a large majority of small/part-time developers) only have one iPhone and since the upgrade to 3.0 is irreversible, I wanted to get some thoughts out there as to what are some best practices for minimizing risk during the transition.
I understand there is no foolproof way of doing full regression testing on both OSes, but any thoughts on how one might minimize regressions would be helpful.
Here's Apple's exact text:
Millions of iPhone and iPod touch
customers will move to iPhone OS 3.0
this summer. Beginning today, all
submissions to the App Store will be
reviewed on the latest beta of iPhone
OS 3.0. If your app submission is not
compatible with iPhone OS 3.0, it will
not be approved.
Existing apps in the App Store should
already run on iPhone OS 3.0 without
modification, but you should test your
existing apps with iPhone OS 3.0 to
ensure there are no compatibility
issues. After iPhone OS 3.0 becomes
available to customers, any app that
is incompatible with iPhone OS 3.0 may
be removed from the App Store.
You really can't test on a device against both 2.21 and 3.0 unless you have two devices. If that's really important, you can think about an iPod Touch (assuming your app doesn't require an iPhone).
As far as the simulator, once you install the 3.0 sdk you won't be able to build targeting 2.2.1 any longer. The old 2.2.1 build target gets replaced by a 3.0 target. To support both, you should think about building a virtual machine that retains the 2.2.1 sdk.
However, I agree with Alex... not much need to think about supporting both platforms. 3.0 is solid, and it's clear from today's Apple mail that it's now the major focus, as far as testing & compatibility.
Edit 5/17/09: One thing I learned after this post is that on the Mac, you can't virtualize the Leopard client OS. Apple only allows you to run the server version of OS X in a virtual machine. IMHO, this really limits software developers as a group, among others, and I hope this is changed eventually.
What is your concern about upgrading your phone from 2.2.1 to 3.0? The latest revision seems more or less solid.
I came across this doc on the iPhone Dev Central that might be useful: Technical Note TN2246

Software and hardware requirements for iOS development

What are the options for developing iPhone apps?
Currently I've tried to install gnu kit for Linux without success! Too many steps, and at the and I was unable to compile a single app.
The Apple SDK seems to be much more easy, but I don't have a Mac.
So am I missing something?
You need a Mac, no question. You also need an iPhone or iPod Touch to develop on as although the simulator is pretty good, it is not perfect - I have example code that works fine in the simulator but fails on the hardware. The hardware also has to be modified to add development keys to it so there is a certain risk to using a real iPhone - many people testify that it's safe enough but myself I chickened and purchase an iPod Touch for development. Keys also have to be installed on your Mac and integrated into Xcode - and that's tricky enough to get right even with the standard Apple setup. Xcode is free and really quite a decent IDE.
Your minimum requirements are therefore
An Intel Mac running the latest Mac OS. Cheapest option there is a Mac Mini - $599 although you could probably pick up one on Ebay that would work just fine for $400 or less.
An iPod Touch (or an iPhone if you need the camera/phone features for your app) - $229
A developer licence from apple so you can get they necessary keys - $99
To emphasize, you absolutely have to test the code on real hardware and the amount of pain you will go though trying to use anything else but a Mac and Xcode will easily eat the cost of buying a Mac.
Yes, the Mac. It's probably not worth the effort without the tools. Especially without the emulator. Apple designed the iPhone, it runs a version of OSX, and they have made the tools. It's not even like all you need is the complier because you don't have the tools to debug, load and manage the applications.
Check out http://oreilly.com/catalog/9780596155193/ from your local libarary, it says you don't need a Mac, just a jailbroken iPhone/iPodTouch and Linux. I don't know that you can use the SDK to do it, I'm waiting for the 2g jailbreak to even start, but I sure hope I don't need a Mac.
Besides the official MAC you have a project at google code that attempts to make a toolchain for Linux and Windows. iphone-dev This link shows you how to build it.
There's another FAQ site that answers many of the base iPhone development questions like this, which I've found useful. So you might want to check out iPhoneDevelopmentFAQ.com