Permalink
Browse files

Conditionally compiled deprecated functions.

  • Loading branch information...
1 parent 0f9c51a commit 0a2c2c0112c323200b95bfb8ebe84b2fe2b43028 shazron committed Sep 1, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 iphone/Classes/PhoneGapDelegate.m
@@ -57,8 +57,10 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application
*/
NSDictionary *temp = [PhoneGapDelegate getBundlePlist:@"PhoneGap"];
settings = [[NSDictionary alloc] initWithDictionary:temp];
-
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
NSNumber *detectNumber = [settings objectForKey:@"DetectPhoneNumber"];
+#endif
NSNumber *useLocation = [settings objectForKey:@"UseLocation"];
NSNumber *useAccelerometer = [settings objectForKey:@"EnableAcceleration"];
NSNumber *autoRotate = [settings objectForKey:@"AutoRotate"];
@@ -90,7 +92,9 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application
NSURLRequest *appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
[webView loadRequest:appReq];
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
webView.detectsPhoneNumbers = [detectNumber boolValue];
+#endif
/*
* imageView - is the Default loading screen, it stay up until the app and UIWebView (WebKit) has completly loaded.

0 comments on commit 0a2c2c0

Please sign in to comment.