You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/12/15 00:12:27 UTC

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

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 <mi...@finantix.com>
Authored: Wed Dec 9 17:20:19 2015 +0100
Committer: Shazron Abdullah <sh...@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