You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "msmtamburro (via GitHub)" <gi...@apache.org> on 2023/06/26 20:40:14 UTC

[GitHub] [cordova-ios] msmtamburro commented on issue #1223: Cannot use custom URL scheme in embedded Web view

msmtamburro commented on issue #1223:
URL: https://github.com/apache/cordova-ios/issues/1223#issuecomment-1608211672

   I see a bug here:
   https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m#L343C102-L343C110
   
   The `stringWithFormat` should be combining two strings, but it is instead combining an NSString and an NSUrl.  Adding `.absoluteString` to the startURL should address this (it's very difficult for me to raise a PR at work, otherwise I'd do this.)
   
   Change:
   url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.CDV_ASSETS_URL, startURL]];
   
   To:
   url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.CDV_ASSETS_URL, startURL.absoluteString]];
   
   Note: without this, loading images off disk will be broken in newer versions of iOS, which I see others reporting in other issues.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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