sjhoeksma / cordova-plugin-keychain-touch-id

Touch ID plugin with saving password in keychain for IOS and android
87 stars 160 forks source link

res directory prevents building with cordova-android 7.x #34

Closed jacobweber closed 6 years ago

jacobweber commented 6 years ago

Try the following with cordova-cli 8.0.0 (I'm using node 8.9.4 on Mac OS 10.13):

cordova create CordovaTest com.sample.cordovatest CordovaTest
cd CordovaTest
cordova platform add android@7.1.0
cordova plugin add cordova-plugin-keychain-touch-id
cordova build android

The output is:

cp: copyFileSync: could not write to dest file (code=ENOENT):/CordovaTest/platforms/android/res/xml/config.xml

(node:29501) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unhandled "error" event. (Parsing /CordovaTest/platforms/android/res/xml/config.xml failed)
(node:29501) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This seems to be because of commands like <source-file src="..." target-dir="res/..." /> in your plugin.xml. It's not documented, but it seems like these need to copy the files to app/src/main/res/... instead, similar to the change for edit-config here. If I remove the platforms/android/res directory, which is created by cordova-plugin-keychain-touch-id, it builds.

lloydmurray commented 6 years ago

I don't think the author is responding anymore.

We fixed this issue and added FaceID here:

https://github.com/paychex/cordova-plugin-keychain-touch-id

It would be nice to get folks together to continue this plugin and update the npm/cordova plugin.