cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Removed usage of deprecated CDVViewController.invokeString in the default project template files.
Date Wed, 28 Nov 2012 19:59:33 GMT
Updated Branches:
  refs/heads/master 5bc8515cb -> 7443bc5fc


Removed usage of deprecated CDVViewController.invokeString in the default project template
files.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/7443bc5f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/7443bc5f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/7443bc5f

Branch: refs/heads/master
Commit: 7443bc5fc7d6795320f829436eec05ee0491f01f
Parents: 5bc8515
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Nov 28 11:59:38 2012 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Nov 28 11:59:38 2012 -0800

----------------------------------------------------------------------
 .../project/__TESTING__/Classes/AppDelegate.m      |   10 +---------
 .../__TESTING__/Classes/MainViewController.m       |    8 --------
 2 files changed, 1 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7443bc5f/bin/templates/project/__TESTING__/Classes/AppDelegate.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/AppDelegate.m b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
index d1263a3..5bd0e1b 100644
--- a/bin/templates/project/__TESTING__/Classes/AppDelegate.m
+++ b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
@@ -54,15 +54,8 @@
  */
 - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
 {
-    NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
-    NSString* invokeString = nil;
-
-    if (url && [url isKindOfClass:[NSURL class]]) {
-        invokeString = [url absoluteString];
-        NSLog(@"__TESTING__ launchOptions = %@", url);
-    }
-
     CGRect screenBounds = [[UIScreen mainScreen] bounds];
+
     self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
     self.window.autoresizesSubviews = YES;
 
@@ -70,7 +63,6 @@
     self.viewController.useSplashScreen = YES;
     self.viewController.wwwFolderName = @"www";
     self.viewController.startPage = @"index.html";
-    self.viewController.invokeString = invokeString;
 
     // NOTE: To customize the view's frame size (which defaults to full screen), override
     // [self.viewController viewWillAppear:] in your view controller.

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7443bc5f/bin/templates/project/__TESTING__/Classes/MainViewController.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/MainViewController.m b/bin/templates/project/__TESTING__/Classes/MainViewController.m
index 44d8da6..d77dee6 100644
--- a/bin/templates/project/__TESTING__/Classes/MainViewController.m
+++ b/bin/templates/project/__TESTING__/Classes/MainViewController.m
@@ -114,14 +114,6 @@
 
 - (void)webViewDidFinishLoad:(UIWebView*)theWebView
 {
-    // only valid if ___PROJECTNAME__-Info.plist specifies a protocol to handle
-    if (self.invokeString) {
-        // this is passed before the deviceready event is fired, so you can access it in
js when you receive deviceready
-        NSLog(@"DEPRECATED: window.invokeString - use the window.handleOpenURL(url) function
instead, which is always called when the app is launched through a custom scheme url.");
-        NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
-        [theWebView stringByEvaluatingJavaScriptFromString:jsString];
-    }
-
     // Black base color for background matches the native apps
     theWebView.backgroundColor = [UIColor blackColor];
 


Mime
View raw message