cordova-plugin-crypto-file
cordova-plugin-crypto-file copied to clipboard
'Cordova/CDVURLProtocol.h' file not found on [email protected]
Hi,
I am currently using Cordova CLI 9.0.0 and cordova-ios 6.0.0. However, when I install the plugin, I get an error.
Current setup for iOS
- Cordova CLI 9.0.0
- cordova-ios 6.0.0
- cordova-plugin-crypto-file 1.4.0
The error I'm seeing
/~/platforms/ios/HelloCordova/Plugins/cordova-plugin-crypto-file/CDVCryptURLProtocol.h:9:9: fatal error: 'Cordova/CDVURLProtocol.h' file not found #import <Cordova/CDVURLProtocol.h>
I would be happy if cordova-ios 6.0.0 also has plugins available.
Same here.
apache/cordova-ios#783
Read the above URL. breaking (CDVURLProtocol): delete by the Cordova-ios team.
Could you please fix this as soon as possible?
Until this is not fixed, I forked this repo and created a version that is enabled on Android only, so that it does not break iOS platform.
cordova plugin add cordova-plugin-crypt-file-android
I hope this helps until the CDVURLProtocol dependency gets replaced with an alternative.
@nasanchez is the plugin encryption gone on iOS with your method? Or is it still doing its job?
no one managed to resolve this issue?
Any solution for this issue ?
I know this might be a dead repo now but has anyone taken a look at how the cordova-plugin-file accesses the local files? from what i know it works on the latest cordova-ios version.
I know this might be a dead repo now but has anyone taken a look at how the cordova-plugin-file accesses the local files? from what i know it works on the latest cordova-ios version.
Thanks, did you try it with latest cordova/ios version? Did the app work for you? When I tried a few months ago -- it compiled fine but the app only showed a blank white screen when loading.
with this plugin xcode will not build the app as apache removed the CDVURLProtocol.h file from the cordova-ios platform repo at version 6.0.0 i do how ever have an ios app that is working fine with the cordova-file-plugin with the latest cordova-ios platform version. I am not that good with ios swift or objective c but i was looking at the code the other day and it looks like we can do with out the CDVURLProtocol.h file code and would need to adjust it to use the wkwebview code as i think cordova-ios is now only working with the wkwebview and doesnt use the uiwebview code. I can give it a go but I cant make many promises.
with this plugin xcode will not build the app as apache removed the CDVURLProtocol.h file from the cordova-ios platform repo at version 6.0.0 i do how ever have an ios app that is working fine with the cordova-file-plugin with the latest cordova-ios platform version. I am not that good with ios swift or objective c but i was looking at the code the other day and it looks like we can do with out the CDVURLProtocol.h file code and would need to adjust it to use the wkwebview code as i think cordova-ios is now only working with the wkwebview and doesnt use the uiwebview code. I can give it a go but I cant make many promises.
Part of the problem is that the plugin code (objective-C) uses NSURL protocol to "intercept" file loading (so that it can decrypt it at runtime -- because your code is packaged encrypted in the IPA file).
But since moving to WkWebView -- NSURL protocol is not supported (it was only supported with UIWebView).
So, the "decryption" part of the plugin does not seem to work.
That was true 4 months ago. However things change, so I don't know what is currently the case / whether they have added support or someone has forked and updated the code and written it up so it works.
Correct. but the weird thing is that cordova-plugin-file also uses the NSURL protocol but still works with the latest cordova-ios version. i have looks at all the forks of this repo and of tkyaji's repo and none of them have been updated in over 2 years but again i started using this plugin not to long ago about the same time phonegap build was shut down.
Edit: here is the results with NSURLProtocol being used in the cordova-plugin-file repo
Is there any chance this plugin will work on iOS again?
I think so. Cordova-ios 6.2.0 has a WKURLShemeHandler I think could be used to update this plugin.