Run application on the older iphone os - iphone

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.

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

Can I prevent users with a too-old OS version from downloading my app?

I currently have an app in the app store that works for iPhone users running iOS version 3.0 or newer. My next version of the app is going to use ARC, so it will only work for users running iOS version 4.0 or newer.
According to this answer, the users will be able to download the newer version, but it just won't run when they try to run it.
Is there any way to prevent users who can't run the app from even downloading it from the AppStore?
I haven't tested this recently, but in February 2011, and iOS 4.x, I had users who couldn't download my app as there device wasn't running the required version of iOS.
They received a nice explanation message on their device, courtesy of the App Store app, when trying to download the app directly to their device.
I'd be very surprised if this wasn't still the case.
So, set the deployment target in your target build settings, and let the App Store / iTunes take care of who can install it.
That was for new installs, and it be different for updates (rather than new installs) but again I'd be surprised if this wasn't handled by Apple for the sake of a better user experience.
UPDATE
I dug out my old iPhone 3 which reached the end of the road at 4.2.1 and resynced it with iTunes - the latest apps that require 4.3 etc are ignored, and are not overwritten with incompatible versions, as I would expect.
I also tried to update my own app (I'm a developer), requiring 4.3 and above, from the store via the device itself, and got a polite pop-up alert saying the app requires iOS 4.3 and above, again just as I'd expect.
The app was previously compatible with < 4.3, and somewhere along the line I bumped up the minimum iOS version requirement, so it is definitely possible.
So, you should just set your updated app's 'deployment target' version appropriately, and it will only be updated on compatible devices.
No. A new higher minimum Deployment target will prevent a user from installing an app on a device with a lower OS version, but will not prevent them from downloading the app using iTunes on their Mac or PC, even though they can't install the update once downloaded.

What should be minimum deployment target set for iphone application while releasing it to App strore?

Hi I am new to the iPhone App development. Currently I released a small application to App store having deployment version 4.3. But some users are not able to download and install the app due to version compatibility. I searched on internet but I didn't get much solution. Now what version should I set while deployment so that every user can use the application?
You should set your minimum deployment version according to API methods you use in your app, i.e. if you use methods from iOS 5 SDK and don't make your app backwards compatible (with support for older versions of iOS), you should set min deployment version to iOS 5. How would you care about users who don't have newer iOS installed is another question.
Deployment target is the minimum version of iOS that is going to be supported by the application. It means iTunes store will allow the users downloading this application having same or higher iOS version on their devices.
To achieve it developer should take care while using the APIs. The API version should not be higher than deployment target iOS version. If you need to use higher API, you should use
[UIDevice currentDevice].systemVersion to check the target device version.
You should set the Deployment target to that of the lowest OS device upon which you have actually tested that version of your app. Many developers keep or borrow an old non-upgraded iOS device just for that purpose. Otherwise your customers become your alpha testers.
go for 3.0 if your code supports that,
maybe that code changes are needed.

Upgrade iOS application to newer OS?

I am a little curious what happens in the following situation. You have an existing app on the iTunes store (with customers) that uses iOS4, you then release an update to the app that uses a newer iOS.
folks that have upgraded to the "newer iOS" will get the update.
What will happen to those that have not updated, will they still be able to use their old iOS4 version?
Your "deployment target" is what matters. Setting the deployment target allows your app to set it's minimum required OS version. Many developers like to set that as far back as possible, unless your app depends on a features only available in a new iOS version.
Lets say you have an app compiled with the iOS 4 SDK and set 3.0 as the deployment target.
Users with iOS 3 or iOS 4 (and iOS 5) can download your app and use it.
Now you release an update compiled with the iOS 5 SDK and set 4.0 as your deployment target.
Users with iOS 4 or iOS 5 can download or upgrade your app and use it.
Users with iOS 3 that have purchased your app already cannot upgrade, but they can continue to use their existing installed version.
Users with iOS 3 that have not purchased your app yet will now have no way to do so.
Apple will only keep exactly one version of your app on the app store.
Unless they download the newer version, they will of course still be able to use the old one. It's possible however that they download the update unintentionally via iTunes on the desktop. The App Store on the device itself would check if the device's OS version is compatible with the app being downloaded, but iTunes does not, so it would replace the old version in the iTunes library, leading to the app being removed from the device when the user syncs it (because the downloaded version cannot be installed).
So, for existing apps, you should keep your deployment target as low as possible and decide at runtime which additional features of a new OS version you can use. This way, you can keep compatibility with older OS versions, but still provide additional features to those who have upgraded.
Usually (although not always), new OSes are the same as the previous ones but with new features. Older versions of apps often work with the latest OS but don't take advantage of the new features. The only problem users usually have is crash problems but it all depends on which APIs you use in your app.
Additionally, updates are never 'forced' upon a user - they are always optional. When it is a case that the app only works on a version of iOS which is higher than what the user has, then the update will not be offered to the user at all. They will still be able to use the older version that they have installed on their device. Apps have no expiry date.
If you want to retain compatibility for as many iOS versions as possible, you can set your iOS deployment target to the minimum OS you want your app to be compatible on. The SDK version number should not matter, but to support the latest iOS features, you would need the latest iOS SDK.
You will still have to check your APIs compatibility with the version you are targeting as a minimum OS. Look here and search for "API Diffs". Each document lists changes to the API for that iOS version. This will lists new and removed APIs as of that version. For example, UIPrintPaper, which is listed in the iOS 4.1 to 4.2 API diffs document, is a new API to iOS 4.2. So, when running on iOS 4.1 or earlier, the app will crash when calling that API. Using #if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_4_1 around your UIPrintPaper snipper will fix that problem.

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.