Is it safe to downgrade an iphone app to a previous SDK? - iphone

I have released an app with the 2.2.1 SDK, to realize that I'm pointlessly losing a big percentage of customers still on firmware 2.2 (See this article: http://arstechnica.com/apple/news/2009/03/app-store-lessons-firmware-followup.ars) So I'm thinking of updating the app to the previous SDK, 2.2.
I was wondering if anyone has run into any problem doing this? Is this safe for customers who have already installed the previous version, to install my "downgrading" update?

The rule of thumb is to build and test your app for the lowest version SDK you can (based on features required).

I have changed an app store app from 2.2.1 to 2.2, and I did not encounter any problems when switching.

I know of no reason this would be a problem. Especially with 2.2.1 to 2.2—it was really a very minor bugfix release.

Iphone os version 2.2.1 introduced no new APIs so you should have no problem to downgrading it to 2.2.
In terms of the other SDK versions (i.e 2.0 and 2.1) apple introduced new/updated APIs. If your app takes advantage of these new/updated APIs you should compile it against the lowest version of the iPhone OS that will successfully run your program.
Compiling against the lowest version possible of the iPhone OS will ensure that your app will be able to be run by the max number of people possible.

Related

iOS app maximum iOS version support

I have developed my app in Xcode 4.1 and iOS SDK version(Base SDK Version) is iOS 4.3 So, will this app run on iPhone with iOS 5 and/or iOS 6 or not?
I think the app can be run on a higher version of the OS than the Deployment Target. Is this right? I appreciate any help.
Yes, your app will run on anything that is iOS 4.3 or newer. That is, assuming you aren't using any depreciated methods that are removed from a future iOS release. You can check if things have been depreciated/removed through the documentation.
It doesn't matter with which Xcode you build your app, the base SDK signifies the lowest system your app is supporting.
You app can and will run on newer systems.
If you want to make an update to your app, you'll need to pay attention to depreciated methods for the newer systems or you will get rejected and won't be able to update in the App Store.
Yes, it will for sure run in higher versions than Deployment Target.
However, is always recommended to run also in newer versions as they are released, to check that every API used is still running fine (specially if they were deprecated).

What sdk version of iPhone app should I use? 4.2 or 3.?

Should I be developing my app for 4.2?
Always use the latest SDK. Apple won't approve any apps built against 3.x anymore.
Edit:
There's a difference between the base SDK and the iOS you plan to support. You need to use the latest SDK as I stated before, however you may still create an app that runs on older versions of iOS by not using classes and methods that have been introduced in newer releases and setting the target OS appropriately.
Unless you have the need to support older iOS devices with older iOS versions, you should develop using 4.2 as it has a lot of features that are missing in 3.x. Most importantly: 3.x doesn't support multitasking.
Also, it's important to understand the relationship between Base SDK version and deployment target. In a nutshell: you can (and should) compile against the latest SDK version but if done correctly, you can still run the app on older iOS versions.
The base SDK should always be the latest version available (4.2 as of right now). Then you can use the deployment target to specify the minimum OS that your application will support, so a good rule of the thumb would be to use 3.0 for that.
Personally, I use some of new iOS 4.0 stuff (ie. GCD) a lot in my applications. I've heard that 90% of ios users are on 4.x. That should be a good middle ground.

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.

Which version of the iPhone SDK should I use for an OS4 app?

I'm wondering if I will have compatibility issues with OS4.0 if my app is built with the 4.1 SDK, or is this a non-issue?
The short answer to your question is: Use a Base SDK Version of at least 4.0 for your application and a Deployment Target Version of exactly 4.0.
I've downvoted both answers because they are wrong or at least incomplete.
When building applications there are two settings that you should be aware of:
There is the Base SDK Version which defines against which version of the SDK your application will be compiled.
There is also the Deployment Target Version which defines the lowest version of the iOS that your application requires. You can set this to as low as 2.2.1 in Xcode but the App Store will not accept versions lower then 3.1.3 at the moment.
The Base SDK Version can be higher then the Deployment Target Version. This simply means that your application is backward compatible with older version of the iOS. This also means that your app needs to make decisions at runtime to be sure not to use newer functionality when running on an older version.
For example, the MFMessageComposeViewController was introduced in 4.0 so if your app has been configured to also run on 3.1.3 then you should use NSClassFromString() to find if that specific class is actually available before you use it.
There are many questions here on Stack Overflow on how to discover available functionality so I will not repeat those techniques here.
And a somewhat important note:
Behaviour does change across OS releases. There were a pile of changes in 3.0 (we had issues with UITableView/UITableViewCell):
Some changes happened on old apps (e.g. compiled for 2.2.1). I forget what these were.
Some of them were in the toolchain (I think they changed how nibs were compiled with ibtool; it was something like setting both an image and a custom view for a UITableViewCell). This happened when we upgraded the SDK on the build server, even if we didn't touch "Base SDK"
Some of them happen only when you compiled with a Base SDK of 3.0 (UIKit automagically detects which version you've linked against and has backwards-compatability modes for some things)
Additionally, there were some runtime/C++ changes in GCC 4.2, which meant a GCC 4.2 app running on OS 2.2.1 crashed when casting unsigned int/long to float/double or using std::ostringstream. I've since added a check for GCC version.
So no, compiling with a newer SDK can result in issues — you might not want to risk it if there are time constraints (you don't have time to implement multitasking support, or you don't have time to do a complete re-test and fix all the bugs, or so). Or maybe you still want to support 2.2.1 for some strange reason (4.0 dropped 2.x "device support", which effectively made it impossible to debug apps on 2.x devices).
Usually nothing breaks across minor OS releases (discounting 3.1/3.2). I'd recommend upgrading SDKs as soon as you have the time; don't shy away from new features just because old OSes don't have them.
Depending on the APIs you will be using. Let's say you want to implemented in-app texting (MFMessageComposeViewController) and want ALL of your end-users (will be defined as EUs) to access that feature then you'll have to compile against iOS 4.0. But let's say you want the in-app texting to be optional and a "plus" for your EUs, you'll just compile your app against iOS 3.0 (let's say).
Hope I answered your question :-)

Run application on the older iphone os

my new app update runs only on 3.1.3 OS and some people who have older os [3.1.2] can't run the application on the iphone .. does it way to solve this ? and my app runs on 3.1.2 iphone os?
You need to rebuild your app update targeting the 3.1.2 OS and resubmit to the AppStore. You also need to isolate any 3.1.3-specific features you are using.
To be more specific on Franci's answer:
You need to set the Deployment Target build setting in your target's settings. Set it to the lowest version of iPhone OS you wish to support.
After doing this, you should always compile your app against the latest SDK, to benefit from bug fixes and performance improvments.
If you use any features from the latest SDK that aren't available on prior OS versions, you should weakly link to the framework in which that feature is defined, and use conditional checks to see if the API exists before using it. If the API doesn't exist at runtime, your app should gracefully fall back onto a default behaviour.
If your app doesn't use any APIs which are not in prior OS versions then you don't need to worry about that.