question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugins config-file not added to .plist file

See original GitHub issue

Bug Report

Problem

I developed a Plugin, which has some <config-file> Entrys. When i build the App for ios, they are not appended to the .plist File.

Information

For example i have the Following in the ios platform part of my plugin:

<config-file target="*-Info.plist" parent="UIBackgroundModes">
    <array>
        <string>bluetooth-central</string>
    </array>
</config-file>

After building, the .plist file does’t include “bluetooth-central” in the “UIBackgroundModes”. An other Plugin, that i use for Location, does the same for adding “location” and this works and appears.

Am i doing anything wrong?

But In the ion.json File, it is present:

{
    "xml": "<array><string>bluetooth-central</string></array>",
    "count": 1
}

I noticed that config files, defined in this Plugin (https://github.com/jeduan/cordova-plugin-facebook4), are not present in my plist either.

Version information

I’m using cordova-ios@5.1.1

Maybe related to #581 , but it is closed (and merged), but still not works for me

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dpa99ccommented, Jun 25, 2020

@HansKrywaa the fix is on the master branch of cordova-common so is as yet unreleased (the latest npm release is cordova-common@4.0.1). The latest release cordova-ios@6.1.0 pins `cordova-common@^4.0.1.

TL;DR: it will take a release of cordova-common then a release of cordova-ios which references it for this fix to become implicit in cordova-ios.

In the meantime, if you need to, you can install directly off my fork of cordova-ios which contains this fix:

cordova platform add https://github.com/dpa99c/cordova-ios
2reactions
erisucommented, Feb 11, 2020

The munging process is not in cordova-ios. It is in the core library cordova-common.

https://github.com/apache/cordova-common

Read more comments on GitHub >

github_iconTop Results From Across the Web

Editing the Entitlements.plist file using config.xml in Phonegap ...
It seems like config-file only works in plugins for some reason. It seems like it should work in your project config.xml , but...
Read more >
Edit Config.xml in outsystems for IOS
Ok, so i got this to work by using the following forge plugin to add new keys to the config.xml. <config-file parent="UIBackgroundModes" target="*-Info.plist">...
Read more >
Config Plugins - Expo Documentation
Learn about config plugins, which are the Expo way of customizing the prebuild phase of an project.
Read more >
How to add keys to `xxx-info.plist` for `ionic platform add ios`
I have a cordova plugin cordova-plugin-camera-roll-location I am updating to swift3 As part of the process, I get this error with the latest ......
Read more >
Plugin.xml reference documentation - Apache Cordova
Do not wrap the file with cordova.define, as it is added automatically. ... <config-file target="*-Info.plist" parent="CFBundleURLTypes"> <array> <dict> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found