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

Plugins config-file not added to .plist file #775

Closed
EinfachHans opened this issue Jan 30, 2020 · 10 comments
Closed

Plugins config-file not added to .plist file #775

EinfachHans opened this issue Jan 30, 2020 · 10 comments

Comments

@EinfachHans
Copy link

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

@breautek
Copy link
Contributor

Can you confirm you're using the latest version of the cli?

cordova -v should read..

9.0.0 (cordova-lib@9.0.1)

@EinfachHans
Copy link
Author

Yes, output is: 9.0.0 (cordova-lib@9.0.1)

@EinfachHans
Copy link
Author

Can someone say me where this merging of the plugins.xml file happens in cordova-ios? Than i can try to fix it

@erisu
Copy link
Member

erisu commented 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

@brodycj
Copy link
Contributor

brodycj commented Feb 18, 2020

I just added the help wanted label, may be related to other issues linked in #793.

@dpa99c
Copy link

dpa99c commented Jun 16, 2020

This is covered by apache/cordova-common#144 and fixed by apache/cordova-common#148

@EinfachHans
Copy link
Author

@dpa99c In which Version of cordova is this fixed?

@dpa99c
Copy link

dpa99c commented 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

@EinfachHans
Copy link
Author

Ok understand 😃 No not that important, as i included all the stuff into my config.xml. Thanks for explaining!

@EinfachHans
Copy link
Author

Closed as cordova-common@4.0.2 is used since cordova-ios@6.1.1 - thank you

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

No branches or pull requests

5 participants