How to add entries to .plist file for IOS

How to add entries to .plist file for IOS

  

I want to perform the following action.

Add URL Schemes to the Whitelist

Simply open your app's .plist (usually platforms/ios/<appname>/<appname>-Info.plist) with an editor and add the following code with your needed Schemes.

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>twitter</string>
    <string>whatsapp</string>
</array>

How to achieve this in Outsystems ? How .plist file can be added or edited in outsystems for ios apps?

Solution

Hi Kartick,

You can create an OutSystems plugin that encapsulates this Cordova Plugin.
With this plugin you can edit the plist.

Kind regards,

Remco Dekkinga

Solution

Thanks Remco,

It worked like magic.. :)

I'm trying to implement this but I must be missing something.

I've downloaded the plugin, changed the xml file and compressed it again.

Added the resources.zip to the app and changed the extensibility configuration file:

"resource": "resources.zip",
    "plugin":
        {
            "url": "https://github.com/ohh2ahh/AppAvailability"
        },
    "plugin2":
        {
            "resource": "resources/edit-plist-file"
        },


But something must be wrong has it doesn't recognized the scheme i'm whitelisting

Any ideias?

Hello Miguel,

Don't know if you managed to make it work but this can be usefull for others. So these were the steps i did to make it work:

1. Downloaded the cordova plugin linked by Remco, from the github (https://github.com/NirbyApp/cordova-plugin-edit-plist-file).

2. Edited the "plugin.xml" file manually like OP wanted to (editing the strings in the array).

3. Created a new mobile application.

4. Zipped and imported to the resources folder the project:


5. Added to the extensibility configuration the following:


6. Created a action (just to validate if Cordova is defined) to be consumed by my project so it has dependency on this new module when generating the app:


7. Consumed the action on my mobile project and generated the app. 

And Done! 


Hope it helps.

Thanks for the explanation Filipe! Didn't know you could add the plugin as a resource! :)

Dear Filipe


can you plz share the sample oml for the same .Bcoz wehn am trying the same am getting error while building the app .


Thanks and Regards

Rajashekar Reddy Ette

Filipe Carvalho wrote:

Hello Miguel,

Don't know if you managed to make it work but this can be usefull for others. So these were the steps i did to make it work:

1. Downloaded the cordova plugin linked by Remco, from the github (https://github.com/NirbyApp/cordova-plugin-edit-plist-file).

2. Edited the "plugin.xml" file manually like OP wanted to (editing the strings in the array).

3. Created a new mobile application.

4. Zipped and imported to the resources folder the project:


5. Added to the extensibility configuration the following:


6. Created a action (just to validate if Cordova is defined) to be consumed by my project so it has dependency on this new module when generating the app:


7. Consumed the action on my mobile project and generated the app. 

And Done! 


Hope it helps.


Does any one can share the sample pList XML for same.

Thanks