[
https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249794#comment-16249794
]
Tom Bell edited comment on CB-13564 at 11/13/17 4:38 PM:
---------------------------------------------------------
It seems that the entry for this inside `platforms/ios/ios.json` is not created
during a prepare, and only when you add a platform, so if you add new
`edit-config` it fails until you remove/add a platform, which seems overkill.
{code}
diff --git a/platforms/ios/ios.json b/platforms/ios/ios.json
index 8194271b..3e5b7ec9 100644
--- a/platforms/ios/ios.json
+++ b/platforms/ios/ios.json
@@ -31,6 +31,14 @@
"id": "config.xml"
}
],
+ "UIStatusBarStyle": [
+ {
+ "xml":
"<string>UIViewControllerBasedStatusBarAppearance</string>",
+ "count": 1,
+ "mode": "merge",
+ "id": "config.xml"
+ }
+ ],
{code}
was (Author: tombell):
It seems that the entry for this inside `platforms/ios/ios.json` is not created
during a prepare, and only when you add a platform, so if you add new
`edit-config` it fails until you remove/add a platform, which seems overkill.
{code}
diff --git a/platforms/ios/ios.json b/platforms/ios/ios.json
index 8194271b..3e5b7ec9 100644
--- a/platforms/ios/ios.json
+++ b/platforms/ios/ios.json
@@ -31,6 +31,14 @@
"id": "config.xml"
}
],
+ "UIStatusBarStyle": [
+ {
+ "xml":
"<string>UIViewControllerBasedStatusBarAppearance</string>",
+ "count": 1,
+ "mode": "merge",
+ "id": "config.xml"
+ }
+ ],
"CFBundleURLTypes": [
{
"xml":
"<array><dict><key>CFBundleURLSchemes</key><array><string>capsulemobile</string></array></dict></array>",
{code}
> Multiple edit-config items for Info.plist causing error
> -------------------------------------------------------
>
> Key: CB-13564
> URL: https://issues.apache.org/jira/browse/CB-13564
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-cli
> Reporter: Tom Bell
>
> I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects
> Versions" dropdown.
> I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0,
> I've got the following
> working:
> {code:xml}
> <edit-config file="*-Info.plist" mode="merge"
> target="NSContactsUsageDescription">
> <string>We require permission to access your contacts so you can import
> contacts into [redacted]</string>
> </edit-config>
> {code}
> However when I decided to move some stuff from an `after_prepare` hook
> script, to use edit-config, it fails with an error `doc.find is not a
> function`
> {code:xml}
> <edit-config file="*-Info.plist" mode="merge"
> target="NSContactsUsageDescription">
> <string>We require permission to access your contacts so you can import
> contacts into [redacted]</string>
> </edit-config>
> <edit-config file="*-Info.plist" mode="merge" target="UIStatusBarStyle">
> <string>UIStatusBarStyleLightContent</string>
> </edit-config>
> {code}
> If I take out the additional `<edit-config>` everything works.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]