Some Info.plist instructions appear unordered
See original GitHub issuePlugins like cordova-plugin-googleplus need this added in the Info.plist
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>REVERSED_CLIENT_ID</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$REVERSED_CLIENT_ID</string>
</array>
</dict>
</array>
</config-file>
When we detect a config-file
or edit-config
tags we output something like this:
Plugin cordova-plugin-googleplus might require you to add
<dict>
<key>CFBundleTypeRole</key>
<key>CFBundleURLName</key>
<key>CFBundleURLSchemes</key>
<string>Editor</string>
<string>REVERSED_CLIENT_ID</string>
<array>
<string>$REVERSED_CLIENT_ID</string>
</array>
</dict>
in the existing CFBundleURLTypes entry of your Info.plist to work
Note that the keys appear first and then the other fields, while it should be key-value
The problem is we use a library we use to read the plugin.xml that converts the content to JS objects, and then convert the JS objects back to XML to show what the user should add to their Info.plist, but the conversion doesn’t work as expected.
Only happens when the edit-config
or config-file
tags include dictionaries
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Data is unordered in pList IOS Swift - Stack Overflow
Make a plist file like this. enter image description here. Then get the array and loop it let path = NSBundle.mainBundle().
Read more >plist does not order items ! | MacRumors Forums
I am trying to read a plist and write to a file in my iPhone application NSString *finalPath = [path ...
Read more >plist localization broken since App Store Connect API 2.1 update
In the past few hours (coinciding with the App Store Connect API 2.1 update) plist localization has stopped working on our builds submitted...
Read more >How do I edit a .plist file? - Ask Different - Apple StackExchange
10. IIRC some plist are compressed though, which makes them unopenable in a text editor without decoding them first. · Well perfect, more...
Read more >The Ultimate Guide to iOS Localization | Phrase
When a localized version of the app is created, Xcode also creates the localization version of InfoPlist.strings. Replace the corresponding key/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The order is only important for
<dict>
elements as they contain key-value elements, so<key>CFBundleTypeRole</key>
should be followed by<string>Editor</string>
. But it’s like that because it’s used for plist files, that are xml like, but not exactly the same, so I would understand that your library (or any xml library) doesn’t handle it.Another possible approach in the CLI would be to read the edit-config and config-file tags content as text and display it as is.
what we read is the plugin.xml that contains the edit-config and config-file tags, so not sure if
plist
will work on them, but we can try