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

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

Open
breautek opened this issue Apr 11, 2023 · 1 comment
Open

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

breautek opened this issue Apr 11, 2023 · 1 comment

Comments

@breautek
Copy link

var projectFileApi = require(path.join(platformPath, '/cordova/lib/projectFile.js'));

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants