how to set compatibility of IOS on app - iphone

I just submitted my app for distribution, when it showed the following message:
"The binary uploaded for the latest version of this app indicates that iOS 4.3 or later is required. Apps that require iOS 4.3 or later will not be available to Verizon iPhone users. If this app could be compatible with earlier iOS versions, you may want to reject the binary and upload a new one that indicates the earliest compatible iOS."
I would like to make the app verizon compatible, if the process is quick.
If I just change the IOS deployment target on my project to 4.0, should it be ok?
Thanks.

It should, if you haven't used some too recent features obviously.
Update: here's a checklist from the official docs of what's new in iOS 4.x
Game Center
Printing
AirPlay
Various enhancements (iAd, Media player, etc...)

It depends what frameworks and other features you are using with your app and whether they are compatible with iOS 4.0. If there are features not compatible, you might be able to disable them for earlier versions, using "weak linking". If possible, test your application on a device using an iOS version earlier than 4.3.

Related

Supporting old iOS versions and devices

I need an iOS app to be compatible with previous iOS versions, at least from 4.0, and also with prior devices (iPhone 4S, 4, 3GS... and likely all iPad devices). I found some posts dealing with the iOS versions backwards compatibility that already have some years (for example, How to build against older iOS versions with the latest Xcode downloads?), and I donĀ“t know if this is deprecated or it still is the way to proceed, at least concerning the app building. Regarding programming issues, I guess I should check the documentation to know if the SDK features/libraries/frameworks I want to use are supported by all the iOS versions I want to be compatible... And having such information, how could I check programmatically the iOS version the device is running, in order to provide a certain feature or not?
On the other hand, regarding iOS versions and devices running them: could I find any Apple document listing which iOS versions supports each existing device? What hardware-dependent issues should I take into account while developing the app?
Thanks so much
Edit: Target architecture(s) is the only hardware consideration I've to take into account? Knowing that, for example, an iPhone 3GS is able to run, and is running, iOS 6.1.3, can I assume that the device will then support all the SDK's features, or I still need to check for the availability of such features depending on the device?
with the newest xcode version that supports iOS 6.0, you cannot develope for devices with iOS < 4.3 (lowest base SDK), and also the version that supports iOS 4.0 doesn't support iOS 6.0. For older devices you have to set the Architectures to armv6 armv7 in you project-settings tab "Build Settings".
for checking the iOS Version running, just check the available posts here at stack, you will find one that fits for you ;)
All in one I would set the base SDK to 5.1 because it's the last that can be used by iPad 1 and iPod touch 3. gen. and long enought available so everyone should have the latest update.
Older devices can have only iOS 4.2.x and are not supported by current xcode (4.6.2 (4H1003)).
iOS Support Matrix v2.4
This version is updated and includes iOS 7.
Link: http://www.iossupportmatrix.com
There is a great infographic that shows what versions of iOS are supported by which devices at http://iossupportmatrix.com.

Is it worth it to continue supporting iOS 4.x when iOS 6 is released?

I am working on a major feature update for my application and would love to include features such as iCloud, Core Data, ARC and storyboards among other things. The issue is that I don't have data on how many users are still running 4.x. I realize that the ideal solution would be to support both at once and just select the available features based on what version the particular device was on, but my upgrades would be so substantial that this would be very difficult. Does anyone else have reliable data on the percentage of users on older versions? And also would it be advisable to release an iOS 5+ version of my app separately as an "App 2.0?"
... my company`s app still suport ios 3.x ,although only 2% on ios 3.x and below... but we can do the vast majority of ios4.0+ effect with 3.x and below API.
Here's an article for reference.
80% on iOS5
With the OTA updates, Apple devices are normally upgraded very quickly. The decision to create an iOS5 only app early this year was not too hard to make and more so now.
I believe iOS users are the fastest ones to upgrade when there's a new update. Also I don't know if it is accepted to have 2 different apps for different versions of iOS. What you could do is having the app check what version of iOS the app is running and exclude the features that are unsupported for lower versions.
Can't find any really reliable sources but you could check out some update stats around.
Link
Changes for ios 6 and Xcode 4.5.x
Xcode 4.5.x (and later) does not support generating armv6 binaries.
Now includes iPhone 5/armv7s support.
The minimum supported deployment target with Xcode 4.5.x or later is iOS 4.3.
The minimum support for iPhone is iPhone 3GS or later as earlier versions use armv6.

How can I support both iOS 4.X SDK and iOS 5 SDK in my iPhone app?

I am writing an iPhone app in which I want to support the largest user base possible at this point in time (with minimal pain), so I decided that targeting IOS 4.3+ would be a good subset of users for my audience.
I started working in XCode 4.2, but reverted back to XCode 4.1 when I realized that the project templates had changed and everything seemed very intertwined with storyboarding, ARC, etc.
I have built out my application to the point I actually want to test on my device, which has iOS5 installed. When I attempt to use it though, I get this message as soon as I click 'use for development' in Organizer/XCode:
The project's build settings look like this:
My Question Is This: How do I get this application, built in XCode 4.1, to run on both iOS 4.3 and iOS 5 phones?
Are iOS SDKs not backward compatible? I come from Android development in which a less than current SDK will generally work on a newer SDK - is this different in the iOS world? And if so, how is this handled typically?
Any direction on how I should proceed would be greatly appreciated.
You can go ahead and open your app in Xcode 4.2 and it should still work. I've been working on a particular app since Xcode 3.x days and I'm nearly done, chugging along in Xcode 4.2 right now. It shouldn't be a problem. If you want to work with Xcode 4.1 you will be fine, but you won't be ale to use new features introduced in iOS 5.
There are several aspects of "cross-version" development to note.
Testing: You can only test on version of iOS that are included with your SDK, or that are installed on physical devices that you may have. The SDK generally comes only with the latest iOS, sometimes the previous one is included as well, but since Xcode 4 was released, the older SDKs have been progressively deprecated with each release. This is not to say that your app which is linked against the iOS 5 SDK won't run on older versions of iOS. It just depends on how you implement new features.
Features: In order to support older versions of iOS properly, you want to make sure that you don't implement new features without properly checking for the existence of classes, methods, and properties that were introduced in the newer versions of the OS. Unlike Android, you don't have to worry about a million hardware configurations. ;-)
Weak Linking: To support a new feature and still be compatible with older versions of iOS, you need to weak link against frameworks that you are using to implement new features. You can read more about that in the Apple Documentation on Weak Linking.
Deployment Target: The setting that prevents the app from loading on older devices is called the "Deployment Target". If you set this to 3.1.3, then your app will run on iOS 3.1.3 and higher. Remember that if you don't code the the proper version checking, your app may break.
ARC: You can choose to enable or disable Automatic Reference Counting when you create the project. ARC scans your program at compile time only, not at runtime, it doesn't break the app on older versions of the OS.
You need the latest version of XCode and the iOS SDK to install your apps onto your iOS 5.0 phone. That doesn't mean the inverse is true -- you don't need the same version of iOS on your device that you have installed on your computer.
Hope this helps!
You can use the latest SDK and simply set the "IOS Deployment Target" version to 4.3 in the project build settings.
XCode 4.1 doesn't support iOS5 in the sense that Xcode package doesn't contain the iOS5 SDK. So you must return to Xcode 4.2 and target your project for iOS 4.3 (you can also target it for iOS 4.0 with this Xcode version, but you will not be able to simulate it; you can even download older iOS 4.x package versions from the Xcode preferences menu if you really need to simulate them in your device).
You can opt-out of ARC if you want, this choice is given to you when you create the project, so don't worry; but consider that ARC does its magic at compile time only, not at runtime, so your backward compatibility will be kept if you decide to use this technology. Finally if you don't want Storyboard just pick the Empty app template and it will simply put in your project only the basic files. From this template you can create any iOS app, this is the approach I normally follow.

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.

What version of IOS to use when upload app to appstore?

I am just about to upload my first app to appstore :-)
I have tested the app on an iPhone 3G (IOS 4.2) and my iPhone 4. What version of code should i upload and:
If i upload 4.2 to support iPhone 3G, will that cause any problems with newer phones?
If i upload the latest version of the code i guess iPhone 3G's will not be able to run it?
Is it worth while to still support iPhone 3G?
Can someone please recommend me what to do?
If you upload a version that the 3G does not support, then all 3G users will not be able to download the app.
If you upload a version that is supported by 3G, then only if the users have updated their firmware will be able to use the app.
In other words, the role of thumb is: upload the one that is tested on the latest firmware, but can be launched from as many firmware version as possible.
That might mean to just upload the one that is tested on the least firmware possible, but be careful because newer firmware versions might stop supporting certain APIs that you might have used, and then all newer (potential) customers will be locked out of your app.
If i upload 4.2 to support iPhone 3G, will that cause any problems with newer phones?
No.
If i upload the latest version of the code i guess iPhone 3G's will not be able to run it?
You need to compile for arm6 in addition to arm7 architecture.
Is it worth while to still support iPhone 3G?
That's a matter of opinion. This there any requirement for you specific app that requires a iPhone 3GS?
Choosing the latest ios as the deployment version is bad idea. iOS 4.3 isn't supported by Verizon devices, which means that you will lose a big portion of US users.
I believe most of apple's apps are using "iOS 3.1" as the deployment version, and i would recommend choosing the this as the lowest supported version.
iOS 3.1 is the last version supported by the original iphone, which guarantees that all users can use your app. Note it's not enougth to just pick 3.1 as the deployment version. you will have to test it with a REAL 3.1 firmware. There are a few guides on downgrading your iphone to 3.1, which is helpful for testing (such as http://lifehacker.com/5572003/how-to-downgrade-your-iphone-3g%5Bs%5D-from-ios-4-to-ios-313)