-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #133 - nil reference to CDV_LOCAL_SERVER #135
fix #133 - nil reference to CDV_LOCAL_SERVER #135
Conversation
Hey @matejkramny Thanks so much man life saver |
Thanks @matejkramny, tested and works perfectly! |
src/ios/CDVWKWebViewEngine.m
Outdated
@@ -755,10 +764,11 @@ -(void)setServerPath:(NSString *) path | |||
if (restart) { | |||
[self.webServer stop]; | |||
} | |||
NSString *serverUrl = self.CDV_LOCAL_SERVER; | |||
|
|||
__block NSString* basePath = self.CDV_LOCAL_SERVER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't rename to basePath
as we have the self.basePath
and can be confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment, other than that looks good to me
@jcesarmobile updated the variable. Thanks! |
Thanks! merged |
Thank you @matejkramny! Great work 💪 |
2.0.3 is published with this fix |
* fix nil reference to CDV_LOCAL_SERVER fixes ionic-team#133 * remove empty spaces * remove more empty spaces * rename local basePath variable
issue is
self.CDV_LOCAL_SERVER
is set when server is started, not when the_file_
route is set up.The change sets up the
CDV_LOCAL_SERVER
path before both so that it's safely accessible in the file handler.