Skip to content
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

'Cordova/CDVURLProtocol.h' file not found on [email protected] #14

Open
Wa-Lt opened this issue Jun 12, 2020 · 12 comments
Open

'Cordova/CDVURLProtocol.h' file not found on [email protected] #14

Wa-Lt opened this issue Jun 12, 2020 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@Wa-Lt
Copy link

Wa-Lt commented Jun 12, 2020

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.

@Wa-Lt Wa-Lt added the bug Something isn't working label Jun 12, 2020
@eyganeshv
Copy link

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?

@enricodente
Copy link

enricodente commented Aug 31, 2020

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.

@enricodente
Copy link

@nasanchez is the plugin encryption gone on iOS with your method? Or is it still doing its job?

@VYRNACH
Copy link

VYRNACH commented Jan 21, 2021

no one managed to resolve this issue?

@chorauoc
Copy link

chorauoc commented Feb 2, 2021

Any solution for this issue ?

@lilmnm-kamikaze-
Copy link

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.

@givethanks1
Copy link

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.

@lilmnm-kamikaze-
Copy link

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.

@givethanks1
Copy link

givethanks1 commented Aug 13, 2021

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.

@lilmnm-kamikaze-
Copy link

lilmnm-kamikaze- commented Aug 13, 2021

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

@secretmoo35
Copy link

Is there any chance this plugin will work on iOS again?

@lilmnm-kamikaze-
Copy link

I think so. Cordova-ios 6.2.0 has a WKURLShemeHandler I think could be used to update this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants