Back to Cordova

2020 08 18

slack-digest/2020-08-18.md

latest1.4 KB
Original Source

Cordova Slack Digest

Tue, 18 Aug 2020 08:21:41 GMT

User count: 4067

Join the conversation at slack.cordova.io

Channel #plugins (2 messages)


Mon, 17 Aug 2020 14:39:08 GMT

@rahadur.rahman says

Hello everyone, How are you? I am new member in this community. I have an issue with recently developed cordova plugin.

The problem is that plugin preference & variable is not copying value from app config.xml or package.json files after build.

Example 1:

<preference

&lt;config-file target="app/src/main/res/values/strings.xml" parent="/*"&gt;
    &lt;string name="publicKey"&gt;$SDK_KEY&lt;/string&gt;
&lt;/config-file&gt;```
Example 2:
```&lt;preference name="SDK_KEY" default="Required" /&gt;

&lt;edit-config file="app/src/main/res/values/strings.xml" target="/*" mode="merge"&gt;
    &lt;string name="publicKey"&gt;$SDK_KEY&lt;/string&gt;
&lt;/edit-config&gt;```

Mon, 17 Aug 2020 17:37:26 GMT

@norman137 says

I'd raise an issue with that, I think I reproduced it the other day trying to reproduce a completely different problem.

I think the variables work if supplied via --variable but I noticed variables wasn't being taken from package.json or config.xml, at least with the cordova-android platform.