-
Notifications
You must be signed in to change notification settings - Fork 336
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
Invalid Data error using Update Platform Config hook #253
Comments
So, the problem is that the hook only support Android and iOS and I'm also using browser platform. Also, I figured out that we do not need to read the files into Just do: // Main
(function () {
if (rootdir) {
// go through each of the platform directories that have been prepared
var platforms = process.env.CORDOVA_PLATFORMS.split(','); More infos in the section Non-JavaScript here if I run cordova prepare
if I run cordova prepare ios
and running cordova prepare android ios
As it only works for Android and iOS, I ignored all the other platforms. Final // Main
(function () {
var supportedPlatforms = ['android', 'ios'];
if (rootdir) {
// go through each platform that have been prepared
var platforms = process.env.CORDOVA_PLATFORMS.split(',');
platforms = _.filter(platforms, function (platform) {
return supportedPlatforms.indexOf(platform) !== -1;
});
_.each(platforms, function (platform) {
try {
platform = platform.trim().toLowerCase();
platformConfig.updatePlatformConfig(platform);
} catch (e) {
process.stdout.write(e);
}
});
}
}()); Looks like it was already fixed in a pull request #228 #199 so I'm wont send pull request to fix it, I'll keep this issue open since any of these pull requests were merged. |
Hi there, I am having a similar issue
Could you please advice what to do? This is my config.xml
Thanks a lot! |
I found this hook here and I installed
/hooks/after_prepare/update_platform_config.js
I'm making fixes related to iOS9 App Transport Security, more info here and at amazon here
But, I'm getting this error:
Does anyone know what I'm doing wrong?
The text was updated successfully, but these errors were encountered: