Closed wildabeast closed 7 years ago
@wildabeast I haven't had a chance to test this but what happens if phonegap.js is not in the app? Does it just get silently skipped on all three platforms?
Good question I'll test that scenario.
Gah yeah looks like it breaks on iOS when its not there. Before I go forward @macdonst is this a reasonable addition? Or should I consider another strategy, like possibly a new option on the sync
method, maybe additionalAssets
, which is an array of additional assets to copy over?
Actually alternatively I could probably use the File plugin and copy it over after the sync completes. Maybe that's a better option.
@wildabeast I would check for existence:
if([fileManager fileExistsAtPath:path]) {
[fileManager copyItemAtURL:sourceURL toURL:destinationURL error:&errorCopy];
}
I'm actually thinking it makes more sense to do what I need with the file plugin from JS rather than tweaking the contentsync plugin to meet my specific needs. Going forward with that, will close this soon.
@wildabeast I wouldn't be opposed to the conditional copy like @imhotep mentioned, please don't add another option to this crazy plugin. However, if you want to just do it with file plug in, go for it.
already done with File plugin :beers:
On Phonegap Build we support both phonegap.js and cordova.js. Would be great if contentsync's copyCordovaAssets also copied phonegap.js.