Cloud build app being rejected at Apple because of Missing Info.plist key

Hi

I just got a mail from iTunes saying my app, build with Ionic Package is being rejected because of Missing Info.plist key NSBluetoothPeripheralUsageDescription.

I am using https://github.com/evothings/cordova-eddystone plugin.

Any ide on how to fix this?

Thanks

The plugin should use http://cordova.apache.org/docs/en/7.x/plugin_ref/spec.html#config-file to add this automatically, as you can’t go in Ionic Package manually and change the file (what probably many are doing locally).

There is also a way to do this via config.xml with Cordova now, but I can’t find it right now…

Ok, it’s actually this exact tag but wrapped in a platform tag:
https://www.simonmacdonald.com/blog/2017/4/13/cordova-plugin-allow-backup (Scroll down to “UPDATE!!!” for an example)

Thanks for fast reply.
Are you sure about the that tag? It seems like that is for Android and not iOS?

Update:
I tried to add this plugin: https://github.com/mircoc/cordova-plugin-settings-hook
But then I got a build error…

Of course the example in the blog post is for android, but the config-file docs show how to create this for iOS too. Invest a bit of thought…

Ionic Package only supports a fixed list of hooks: https://github.com/driftyco/ionic-package-hooks. This is probably not one of them (and the reason I researched the config.xml stuff for you - locally these hooks are great)

Thanks for being patience.

I develop on windows, and have never seen a iOS build except from the .ipa file I get from Ionic Cloud build.
That is why I have to ask: Is info.plist a file I should create in root or is it something Ionic package is creating for me?

My config.xml looks like this now:

 ...
 <platform name="ios">
<config-file target="*-Info.plist" parent="NSBluetoothPeripheralUsageDescription">
<array>
    <dict>
        <key>NSBluetoothPeripheralUsageDescription</key>
        <string>The app would like to use bluetooth</string>
    </dict>
</array>
</config-file>
  <platform name="ios">
...

Last line should probably be just </platform> as it closes the opening tag in the first line.

Here is an example I found online:

<platform name="ios">
<config-file parent="NSCalendarsUsageDescription" platform="ios" target="*-Info.plist">
    <string>Advertisement would like to create a calendar event.</string>
</config-file>
<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
    <string>Advertisement would like to store a photo.</string>
</config-file>
<config-file parent="NSBluetoothPeripheralUsageDescription" platform="ios" target="*-Info.plist">
    <string>Advertisement would like to use bluetooth.</string>
</config-file>
</platform>

(From https://github.com/floatinghotpot/cordova-admob-pro/issues/459, similar problem)

So looking at this it might even be simpler - see that last config-file in there.

If you add the iOS platform on Windows, too, you should get files inside /platform/ios. In there you should find these or similar files already and be able to look at them.

I added the above code to config.xml.
Unfortunally not working.
Is Ionic Cloud build supposed to create a info.plist file and bundle it the .ipa file?

Ionic Package executes a cordova build in the background and that’s exactly what should happen there - lots of files get created, also this one with information from config.xml.

I suggest asking here https://ionic.zendesk.com/hc/en-us/requests/new?ticket_form_id=632068 if you don’t get a better answer or someone trys to replicate it on his Mac.