iPhone application compatibility - iphone

Please how can I make sure before developing my iPhone app that it will be compatible with iPhone4, 3GS, iPod touch and 3G?

You need to create the app keeping in mind all the features available in lowest version of iPhone you need it to be compatible to.
For Example:
Suppose you want it to be compatible to iPhone 2G then you cannot use in-app SMS feature as iPhone 2G cannot be upgraded to iOS 4.0 or higher.
In-app SMS feature is only available in iOS 4.0 and higher versions.
Hope this example gave you a proper idea.
Once the app is made, you should test your app throughly on different devices i.e. iPhone 3G, iPhone 3GS and iPhone 4 and iPod Touch.
Unless you test it on device, you cannot be sure because sometimes some of the things work in simulator but crashes on device.
So better to test on device.
Hope this helps you.

If it's the SDK you are talking about, you might want to make sure it runs on iOS 3.X versions. See here for more details.
If it's the hardware you are talking about, you will need to test your app on separate pieces of hardware to make sure that they all run.

The settings in XCode that you make regarding which version of iOS your app will be compatible with is the iOS deployment target and the Base SDK. The Base SDK is the default version you are building against (this should be set to the most recent SDK which is currently 4.3). The iOS deployment target is the earliest version you would like your app to be available for (currently goes back to 3.0 on XCode 4).
These settings are in the settings for your target.
As for if your app will actually work on all of these devices depends on how you program for them. In other words, if you are using new APIs, they obviously will not work on versions that did not implement them.
Hope this helps.
Jamie

You can't be sure without testing. (and even with testing, some say...)
There are potential "gothcha's" in the iOS API documentation, in the Simulator handling of those APIs, and particularly in device performance, which you may not realize or be able to guess until you actually try an app out on all the device models and iOS versions which you plan to support.
Even some simple apps with no undocumented API use and no compiler or analyzer warnings, et.al., have been know to "break" after a new OS version is released.
You can "claim" an app is compatible by appropriate setting of the Deployment Target in the Build settings, lack of plist hardware restrictions, and in the app store submission data. But that's only a claim, not compatibility.

Related

Restrict iPhone/iPad App to iPhone 4 and higher only?

I am looking to make my app so that it only works on iPhone4 or higher, and not the 3GS.
How can I do this? Is it done via setting the Architectures setting to Standard Armv7/Armv7s
And Valid architectures to Armv7 & Armv7s?
Or do I need to look at deployment target? And set it to a certain iOS version?
Thanks in advance!
Deployment target is only going to allow you to target a specific iOS version and a 3GS can run iOS6. If you're truly looking to restrict older devices from running your app you're likely going to have to do some checks for device model within the AppDelegate and restrict functionality.
A caveat to this is that your app will likely not be permitted in the App Store. What feature(s) are you trying to leverage that a 3GS doesn't support?
Unfortunately you can target the iOS version not the device! You can try to build for iOS 6.0+ and it'll isolate some older devices like iPad1. I'm not sure what iOS version will go up to on 3GS, it'll be phased out soon, though with upcoming iOS releases. I know iOS 6 will work on 3GS but iPad1 won't
You can detect the device, and restrict it via code, but through Apple and iTunes, there is no device centric restrictions, only OS.

IPhone app build and deliver to store without device

I have a simple question.
I use an old IPhone with ios version 3.1.3 and I have to deliver an app for the ios version 5.0.
Is it possible to build and deliver an 5.0 app to the store without the correct 5.0 device?
Problem is, it isn't really cheap to buy every single ios version device.
I know it is probably necessary to test on a real device, but I only want to know is it theoretically possible do develop and deliver without the device.
thanks for your help
Matthias
Yes, it's possible. Xcode comes with an iOS simulator that simulates iPhones and iPads running iOS 4.3 and 5.0. However these don't fully match real devices, so you really should be testing on real devices. There's an additional problem that a lot of functionality won't work on the simulator, such as in-app purchases and Game Center. But for basic applications, you can scrape by.
If you're looking to reduce costs, iPod touches are almost identical to iPhones and a lot cheaper, so that's the low cost way of testing on a real device. I would also upgrade your current device to iOS 4 if possible - iOS 3 is practically dead now, so it's better to test on a real device with iOS 4 than it is to try to support iOS 3.
Yes it is possible to deliver an app without the correct version.
I found out, that it is even possible to deliver apps without an iPhone.
even though you can deploy apps without having an iOS device ..or having a device with lower iOS version..
but in future and generally a good advice i will give is to find someone with correct iOS device version(any other version will work too) and get him to try your app using ad-hoc distribution..that way you can get feedback of how your app will perform..
Yes it's possible. You can anyway test most functionality by using the simulator.
With the new Xcode, you don't need the device when you are building for release.
What you need to do is select iOS Device in the menu, then Product -> Archive.
Then you will see the "Validate" and "Submit" options in your organizer.

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)

Check SDK methods used in an iPhone app

As Apple adds new APIs and new methods to APIs with every new iOS update or release and given that nowadays you can't even test on an iOS 3.x simulator, is there any way to test your iPhone app in older SDKs or to know what SDK level you are using through it?
Downgrading to an old Xcode with a 3.x simulator is not an option and, well, there are tons of methods introduced in, say, 4.2.
Has any one come up with a lib, script, tool, anything, that analyzes the code to show API usage?
The way most iOS developers do this is to keep around an old 1st or 2nd generation iPod Touch (or other old iPhone device) that hasn't been updated past the oldest iPhone OS version that they plan on supporting with their Deployment Target setting.
A cheap used iOS device, even with a scratched/cracked display or mostly dead battery, from eBay (et.al. or some neighbor or nephew who upgraded), might work.
Testing on an old device is actually a better and more accurate check than just testing with the Simulator, as the Simulator for various SDK versions supported APIs that the device at that OS level did not.

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