Repository: cordova-ios
Updated Branches:
  refs/heads/4.0.x b3cfbeea8 -> e40a776fa


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/c586fc22
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c586fc22
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c586fc22

Branch: refs/heads/4.0.x
Commit: c586fc228f49fda6d19f888b183f93fcd6f3a4df
Parents: b3cfbee
Author: Mirko Luchi <[email protected]>
Authored: Wed Dec 9 17:20:19 2015 +0100
Committer: Shazron Abdullah <[email protected]>
Committed: Tue Dec 15 16:59:33 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c586fc22/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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to