kelvinhokk / cordova-plugin-localization-strings

Cordova Plugin for Localization of Strings on the App
MIT License
119 stars 107 forks source link

projectFile import will break in cordova-ios@7 #79

Open breautek opened 1 year ago

breautek commented 1 year ago

https://github.com/kelvinhokk/cordova-plugin-localization-strings/blob/5b681a10e70dc60431791b972f6b73bcfaed6aab/scripts/create_ios_strings.js#L162

This is more-or-less a heads up that this import will break as the CLI lib tools will no longer be copied to the project and instead will remain inside the node_modules.

cordova-ios@7 isn't released but it can be tested using the development version found in the master branch of cordova-ios repository.

Starting with cordova-ios@7, require('cordova-ios/lib/projectFile') should be a sufficient workaround (this will be a breaking change and won't work for cordova-ios@6 or earlier).

However, this plugin is accessing a private module, projectFile isn't part of the public API, so doing this is dangerous, as it could change in a breaking way without notice. So I'd also suggest creating a Feature Request explaining the reasoning for using this API and perhaps we can also look at exposing it in a proper way for cordova-ios@7 release.

rodrigograca31 commented 1 year ago

Thank you for the heads up! I dont have the bandwidth to fix it my self but I will accept any PRs that do.