cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: CB-10168: CDVViewController appURL is nil if wwwFolderName is the path to a resource bundle
Date Mon, 14 Dec 2015 23:12:27 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/master 58885067f -> d3c551971


CB-10168: CDVViewController appURL is nil if wwwFolderName is the path to a resource bundle

This closes #184


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

Branch: refs/heads/master
Commit: d3c5519719d172bfcf6d994c740615b6fdfa91e6
Parents: 5888506
Author: Mirko Luchi <mirko.luchi@finantix.com>
Authored: Wed Dec 9 17:20:19 2015 +0100
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Dec 14 15:12:51 2015 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVViewController.m | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d3c55197/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index e24eef6..b66f524 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -191,6 +191,10 @@
         appURL = [NSURL URLWithString:self.startPage];
     } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) {
         appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName,
self.startPage]];
+    } else if([self.wwwFolderName hasSuffix:@".bundle"]){
+        // www folder is actually a bundle
+        NSBundle* bundle = [NSBundle bundleWithPath:self.wwwFolderName];
+        appURL = [bundle URLForResource:self.startPage withExtension:nil];
     } else {
         // CB-3005 strip parameters from start page to check if page exists in resources
         NSURL* startURL = [NSURL URLWithString:self.startPage];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message