stupidchou opened a new issue, #1252:
URL: https://github.com/apache/cordova-ios/issues/1252
### Issue Type
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ ] Bug Report
- [ ] Feature Request
- [x] Support Question
## Description
When I call the https request, I want to use the local js file and find that
the local js cannot be intercepted
## Information
When using cordova to access remote html, I use <script
src="ebeiapp://cordova.js"> to call my local js in html, and [NSURLProtocol
wk_registerScheme:@"ebeiapp"] has been executed in iOS, Intercepted but https
request NSURLProtocol interception did not take effect.
### Command or Code
[NSURLProtocol wk_registerScheme:@"ebeiapp"];
[NSURLProtocol registerClass:[EBURLProtocol class]];
https remote html, the following method does not execute
+ (BOOL)canInitWithRequest:(NSURLRequest*)theRequest
{
NSURL* theUrl = [theRequest URL];
if ([[theUrl absoluteString] hasPrefix:@"ebeiapp"]) {
return YES;
}
else {
if ([[theUrl absoluteString] hasPrefix:@"assets-library://"]) {
return YES;
}
return NO;
}
}
### Environment, Platform, Device
iOS
### Version information
Cordova: Cordova Plugins
Other Frameworks: Xcode
## Checklist
<!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
- [ ] I searched for already existing GitHub issues about this
- [x] I updated all Cordova tooling to their most recent version
- [x] I included all the necessary information above
Looking forward to your reply
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]