Is there a diff in the new iphone versus previous version (development perspective)? - iphone

If I get an iphone, should I go for the latest version (with the antenna issue) or can I make do just fine with the previous version?
i.e. are there significant O/S changes that will effect my ability to test and run an iphone application?

A previous version (3g or 3gs) can still run the latest O/S (4.0.2), the only things truly different programmatically for the iPhone 4 is the higher pixel count and resolution of the screen, the new camera, and the new/improved gyro/accelerometer.

The iPhone 3G can't do multitasking. If you want to test your app's multitasking capabilities, you'll need at least an iPhone 3GS or the latest generation of iPod Touch.

Related

Is it possible to find the location from background in iPhone 3G, 3GS

I am making an app in which i need to find the location from background when userpress the home button, my app works fine on iPad2 and it gets updated,however its not working on iPhone, apart from iPhone 4, previous version of iPhone, is it possible to track update on that older version of iPhone leaving iPhone 4
As Badgerr commented, iPhone 3GS was the first version of the iPhone to support multi tasking. Previous versions of the iPhone are not capable of tracking the user location without the app running in the foreground. As soon as a third party app enters the background it gets closed.
http://support.apple.com/kb/HT4211:
Multitasking in iOS 4 is supported on iPhone 3GS or later, iPod touch
(3rd generation or later), and all iPad models.
Since you mention that your app is running on iPad and iPhone, I assume that you are not asking about how to get the location when the app is running in background and that you are doing correctly as explained here.
As to the rest, your problem may have to do with background processing being only available starting from iOS 4.0.
So, more than the specific model of iPhone, what matters is the iOS version that is installed on your device (or if it can be installed).

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

When developing for iOS, which devices do you typically test on?

I'm needing to purchase whatever devices are needed to do testing for iOS applications. My initial thoughts are to test on a first-generation iPod Touch and an iPhone 4. Testing on the old iPod Touch with 3.1 software will give a good indication on how the app will work with little memory, and the iPhone 4 will obviously be a test for the faster system.
What do you all typically test on before submitting an application?
At minimum, a device running the oldest OS that I list as my Deployment Target, the slowest device/OS combo that I have (e.g. a 3G running 4.0.x is likely slower than anything running a 3.x OS) and which the app supports, and the current/latest released OS.
A device which includes all the features that my app will support (e.g. mic, camera, gyro, GPS, etc., if needed.)
Optionally, an iPad if the app is Universal, or if not to see how bad 2X zoom looks.
Optionally, a device with a beta OS installed if it appears Apple is going to release it well before I plan on revising the app.
So far all the apps I've submitted have been compatible with iOS 3.1.x, and I test them on my old 1st gen iPod Touch. I also test on my 3.2.2 iPad and my 4.0.2 iPhone 3GS.
My guess is all of these answers are going to be along the same lines -- test with as wide of a variety of devices as you can that are compatible with your app (i.e. meet the Minimum Deployment Version).
This is especially important if you develop Universal Apps that support 3.1.x. You'll find a ton of bugs with the hardware that you will never get with the simulator.
right now, I test using a 3g running 3.1 (a popular build), a 3gs running 4.0.2 (latest), a touch running 3.1.3(basically 3.1), and an iPhone 4 with 4.0.2.
Mainly try to keep a 3.x device around for sure, and then obviously a device with the most up to date OS.
Based on AdMob reports...around 98% of users are upgraded to atleast 3.0 and those that aren't shouldn't be your client base anyway (unlikely to use new apps).

Iphone Ipad QA testing process

I'm curious about how people test their apps In general.
I recently uploaded an app and wanted to reach as many iOS' as possible so i targeted it to 3.0. I did test on iphone 3, iphone 4 and 3GS but found out that there was an obscure sizing of a button image on a specific ios version.
In general how do you guys test for different versions?
Do people actually keep 3, 3gs and 4. Then on each, do people test on the various versions of ios within each of the phones. Yuck, anything to make this easier?
For the simulator, each xcode download contains only latest os and hardware to target. It would be nice if it could keep older os versions on the simulator to test with, is this possible?
My apps are CPU demanding, so optimizing for each device is big issue for me, so I keep an 3G, 3GS, 4, a 2G iPod Touch, and an iPad around for testing.
It's not always necessary though. Most cases you probably don't have heavy, time critical code, that needs to be optimized, so an iPhone 3GS at a minimum, possibly an iPhone 4 (for high DPI testing, although the simular may be fine for this), and an iPad (if you support it) is all you need.
If you keep your device images in your XCode organizer, you can reflash your device with all the OS version you want to QA on. It really depends on what you need. Unfortunately you can't go back and find older OS versions and install them if you didn't get them before they became out of date (partly because of the checksum process that calls back to Apple after you update to a new version, that attempts to prevent downgrading or upgrading to versions with security holes).