cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: Allow any scheme when specifying start page as a URL.
Date Thu, 06 Dec 2012 17:25:51 GMT
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 <agrieve@chromium.org>
Authored: Thu Dec 6 12:16:19 2012 -0500
Committer: Andrew Grieve <agrieve@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];


Mime
View raw message