You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/12/06 18:25:51 UTC

ios commit: Allow any scheme when specifying start page as a URL.

Updated Branches:
  refs/heads/master 7e970ad89 -> b00d496f9


Allow any scheme when specifying start page as a URL.


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

Branch: refs/heads/master
Commit: b00d496f9e2be00096e3252d43f5f9f42c930c33
Parents: 7e970ad
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Dec 6 12:16:19 2012 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Dec 6 12:16:19 2012 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b00d496f/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index ed13912..93a3da3 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -173,9 +173,9 @@ static NSString* gOriginalUserAgent = nil;
     NSURL* appURL = nil;
     NSString* loadErr = nil;
 
-    if ([self.startPage hasPrefix:@"http://"] || [self.startPage hasPrefix:@"https://"]) {
+    if ([self.startPage rangeOfString:@"://"].location != NSNotFound) {
         appURL = [NSURL URLWithString:self.startPage];
-    } else if ([self.wwwFolderName hasPrefix:@"http://"] || [self.wwwFolderName hasPrefix:@"https://"]) {
+    } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) {
         appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]];
     } else {
         NSString* startFilePath = [_commandDelegate pathForResource:self.startPage];