I have developing an iPhone application using xcode 4 which is compatible with iOS 4.3 and runs on iPhone 4 device smoothly.
My question is how to check whether my application is compatible with iOS 3 or not.
I do not have any iOS 3 device to run the app so the only solution is to check the compatibility for iOS 3 is simulator but I have not found any option to run the app on iOS 3 simulator.
Any suggestion how to install SDK for iOS 3.
Thanks
Asked
Active
Viewed 1,564 times
2

Manish Agrawal
- 10,958
- 6
- 44
- 76
-
4Why would you bother supporting iOS 3 anyway? – Tom van der Woerdt Dec 29 '11 at 18:35
-
2@TomvanderWoerdt - so the 23 bazillion phones out there running ios 3 can run the app. – Rayfleck Dec 29 '11 at 18:37
-
@Rayfleck I haven't seen a single iOS 3 device (iPhone 3G) in ages. – Tom van der Woerdt Dec 29 '11 at 18:38
-
just want the app to compatible with most of the iOS devices so that most of the user able to use the app. – Manish Agrawal Dec 29 '11 at 18:40
-
@Rayfleck for the same reason I want to do this. – Manish Agrawal Dec 29 '11 at 18:41
-
@TomvanderWoerdt - as developers, it's easy to assume that everyone is on the cutting edge or at least iOS 4, but there are lots of late adopters out there. And if you can include them with a few lines of code, why not? – Rayfleck Dec 29 '11 at 18:42
4 Answers
2
The only way to be sure of compatibility is to borrow or buy a device running iOS 3 for testing. The Simulator, even an old one, is not accurate enough to ensure compatibility.
If you can't find a device still running 3.x anywhere, even just to borrow for an hour, why bother with compatibility with such a rarity?

hotpaw2
- 70,107
- 14
- 90
- 153
-
Thanks for your reply. Yes, I also think that simple solution to do this is to borrow an iOS 3 device and test on that. – Manish Agrawal Dec 29 '11 at 19:20
-
But how you can say that iOS3 is rare, you have any statistics? – Manish Agrawal Dec 29 '11 at 19:21
-
2
2
Here's my checklist for iOS 3:
- make sure that your app runs fine on slow CPU and less memory.
- support armv6. add armv6 to architectures, remove armv7 from required device capability, and disable thumb on armv6 if your compiler has code generation bug.
- don't use ARC, whick is not (officially) supported on iOS 3.
- check for existence of newer method (with respondsToSelector:) or class, instead of checking the OS version in most cases.
- don't use gesture recognizers which did exist on iOS 3 but were private API, and lack important methods. you need to handle touch events manually.
- if you use blocks, you need to link the system library dynamically, and it requires iOS 3.1 (I've heard that iOS 3.0 doesn't support dynamic link.)
Here is an example application:didFinishLaunchingWithOptions: method.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
if ([self.window respondsToSelector:@selector(setRootViewController:)]) {
self.window.rootViewController = self.viewController;
} else {
[self.window addSubview:self.viewController.view];
}
[self.window makeKeyAndVisible];
return YES;
}

hoshi
- 1,677
- 16
- 22
1
Tap the project, tap your target, tap Summary, set your Deployment Target to 3.x. Then the Scheme pulldown in the top of XCode will show you options to run it in the 3.x simulators.

Rayfleck
- 12,116
- 8
- 48
- 74
-
When I click on target section in left panel there is no option for summary and deployment target, I am using xcode 3.2.6 version. Thanks – Manish Agrawal Dec 30 '11 at 11:42
-
in 3.x, double-click the project, select the build tab, find the Deployment section, find the line for "iOS Deployment Target", set it to iOS 3.2 – Rayfleck Dec 30 '11 at 17:38
0
On the iOS developer center there's a download link to Xcode 3. That one might include iOS 3.

Tom van der Woerdt
- 29,532
- 7
- 72
- 105