iPhone OS 4.0 backwards compatible with 3.1/.2 - iphone

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).

Related

Is iOS 4 generally backwards compatible?

I have the following problem, in near future I will need to write a few not very complicated apps for iPhone. I do not currently own an iPhone, so I plan to purchase one for testing purposes. In short would iPhone 4 allow me to test apps written for older ios versions? Any pitfalls? Or would I have to purchase older phones/ipad to do the testing properly?
Yes, to perform a proper test you will need to test on the individual devices you are supporting. The documentation will tell you if the framework/API you are using is supported in the older iOS versions. I'm afraid there will be some subjective answers here as I am sure some apps end up running just fine across many versions with simulator testing. There are many factors to consider when looking at backwards compatibility (desired speed, memory usage, APIs, ...). You stated your app is "not very complicated" so you may be fine. I would test your application on as many devices as possible.
I should also make the distinction that there is a difference between "will it compile" and "does it perform as expected". You can use xcode to test whether the application is compatible by targeting and older version. Whether or not the application runs as desired will be discovered when testing on the specific devices.
You can't run iOS 3 on iPhone 4, so you have to buy separate devices.
But if it is a new app I wouldn't consider to make it iOS3 compatible. Most users have upgraded to iOS4 already. And at the time your app is in the store there will be even less users running iOS3.
Sure, this will remove like 0,5% of potential customers. But you don't want to buy another device for 100$ if you can get only 10$ revenue from the 0,5% customers that run iOS3. And you have to test your whole app again, which will take a significant amount of time.
So you should consider to drop support for iOS3.
See this question: Will an application compiled for iOS 3 run on iOS 4?
It will allow you to test apps which are targeted at older iOS versions, yes.
Performance differences to older iDevices like the 1st gen iPhone / iPod touch are quite significant however. So if your apps require expensive calculations or the like, I'd recommend buying an older, used device too to get a feeling for performance on that generation of hardware.
Note that if you need to make sure the apps you are about to develop will run on very old devices / iOS versions, you maybe need to do without some cocoa classes and methods which require more recent versions of iOS
If you bought an iPhone 4 for testing purpose.. You're testing on the latest iPhone available in the market and that doesn't means your app is ready to target low-end device automatically.
Let's take a deep look: If you've designed an App that must look gorgeous and work right out of the box on iPhone 4, then you're probably making your app a Retina display compatible. That is like playing with 960x640 resolution screen.
Now, if you planned to target low-end device for eg, iPhone 3GS, then all you gotta do is to reduce the graphic assets size by half, as iPhone 3GS is 320x480
That's it! Your App is ready for the low-end device as well, in looks and feels perspective.
Now, let's look from deployment perspective. If you base SDK is 4.2.1 and you're targeting to devices which runs 3.3, then all you gotta do is to make sure you don't use latest libraries/classes which are introduced in iOS 4.2.1, as they won't be available to device which are running on iOS 3.3. If you take care of this part, your app is almost ready to ship out.
From Market perspective. I see all the great apps out there had made their deployment target as iOS 4.0 or later. That means, they are targeting to only devices which runs iOS 4.0 or later versions.
I think, you can try your build in low-end iPhone simulator after successful testing cycles ran on iPhone 4 device. :)
The iPhone is generally not backwards compatible. Sometimes methods, properties, classes etc. are added or older ones become deprecated.
For testing, i would recommend that you have several devices with different iOS Versions depending on the target iOS Version you want to release.
Also check the the iOS Reference Library: Under "Availability" for each function etc. is noted since when it is Available

Do I need to buy Iphone for Iphone development?

Do I need to buy Iphone to develop Iphone applications on MacBook Pro? Or is Iphone SDK for the job?
Thanks.
Technically no, but obviously it would be handy.
Xcode provides an iPhone simulator that can handle most testing (but without support for accelerometer or microphone).
All in all, if you plan on doing iPhone development seriously - get an iPhone.
Technically you could use the emulator with the SDK but you really want some raw devices to test on due to subtle differences.
The iPod touch does a great job for testing apps on a real device. Its performances are very closed to the iPhone and it is much cheaper.
Technically no, unless you building apps related to accelerometer, microphone, sms or auto calling applications. The SDK comes with the iPhone simulator which is more than handy
You can use the Xcode iPhone simulator as well as the iPad simulator to test your code, all of which is free. The only issue will be accessing certain filemanagement which cannot be debugged on a simulator. However, you must have a computer running on Mac OS X and a valid Apple ID to download Xcode. Finally, in order to submit Apps into the App Store, you must buy a $100 developer's license with Apple.
Hope that help! And iPhone development is a ton of fun :)
Thommy
I highly recommend to get the device you're developing for. Since some issues will only will only come up by really using your app as intended.
The touchscreen and it's behavior for example can't really be testet in the simulator. If you want to do more than the next "Fart App" you should invest the money in at least one actuel iOS device.
I will speak from personal experience with a financial prespective
Can you afford it or is the short term compensation from the work going to cover the cost? The latest models are pretty expensive, so I would suggest looking for good deals on models that are a couple of years old. When I say short term, I mean 3 years or less. Because after that, there is a good chance that you are going to need to buy a newer model to take advantage of the SDK features available at that time.
Even if you can afford it do you need it immediately? Are you soon going to be developing features that are completely dependent on hardware and impossible with a simulator ? If no please push the purchase further down the line, by which time you would have made some money (or not) and you can buy a newer model.
Having a latest device gives you the freedom to try out and build apps using the latest SDK features that Apple rolls out, so you can stay ahead in the game. On the flip side, it would be good for development only as long as at least one of the apps that you are developing for runs the highest version of iOS supported by the device at any particular time. For example I bought an iPhone 5S some years ago and now none of the apps I am working on run on iOS 12. So I have very little use for it. Ah I guess the vicious upgrade cycle gets developers too :(

Is it worth only supporting the iOS 4 when making an iPhone app?

If I am creating an iPhone app, is it worth trying to make sacrifices with functionality (e.g. with MPMoviePlayer) in the application and support previous versions of the OS?
Are the majority of iPhone users running iOS 4?
Will I lose out on a big portion of the market if I only support iOS 4?
There will still be a lot of iOS 3.x users because iOS 4 cannot be installed on original iPhones and older iPod touches. And iOS 4 barely works on iPhone 3G. You can still use functionality of iOS 4 while still targeting older versions though.
I've been learning through doing user testing that a lot of people don't upgrade their apps, much less their OS. Add that to the fact that lots of devices can't run 4.0, and I think you'll limit your market if you don't support at least 3.1.x.
As to 2.x, this report says it was less than 13% 5 months ago, so it's probably safe not to support for a new app at this point.
First, you're forgetting something: You need to support 3.2 if you want your app to run on the iPad.
You don't have to "sacrifice functionality"; you just have to code your app to detect what features are available at runtime and fallback gracefully.
If your app isn't free, then the real question is "Will users who don't upgrade buy my app?", and I suspect the answer is generally no. Apparently a substantial portion of the 2.x installed base are iPod Touch users who don't want to pay for the upgrade.
The other factor is the amount of work. If you use few enough iOS 4 features that it's not much work to also make it run on 3.1.3, then supporting 3.1.3 is a no-brainer. Of course, never support an OS version you can't test.
If this is a brand new app, there's not much point in supporting older versions of the OS. It will require making sacrifices when programming the app, and over time everybody will eventually move to iOS 4.

Testing iPhone Software on Different Versions Of OS

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.

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