You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2013/01/09 02:45:11 UTC

[jira] [Resolved] (CB-2160) cordova_plist_to_config_xml fails inexplicably

     [ https://issues.apache.org/jira/browse/CB-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-2160.
-------------------------------

    Resolution: Fixed

The problem was that you had a binary plist instead of a text one. I fixed the script to handle this:

https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=commit;h=b4c2ca3056bcf72a2717d8c7b34ec91ea25cc644

Do you recall if you did something special to make yours in binary format? Wondering if we should post this as a known-issue somewhere if this is going to be a common thing.

The fix is to run this on the file first:
plutil -convert xml1 Cordova.plist

                
> cordova_plist_to_config_xml fails inexplicably
> ----------------------------------------------
>
>                 Key: CB-2160
>                 URL: https://issues.apache.org/jira/browse/CB-2160
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs, iOS
>    Affects Versions: 2.3.0
>         Environment: 2.3.0
>            Reporter: Jesse MacFadyen
>            Assignee: Andrew Grieve
>         Attachments: Cordova.plist
>
>
> Issue CB-1893 has apparently made it so you can update the plist to xml, however the documentation is non-existent, and amounts to the following 1 line in the upgrade guide.
> 10. Convert your Cordova.plist file to config.xml, by running the script bin/cordova_plist_to_config_xml on your project file.
> Here is what I get ...
> jessem-MacBookPro:ios jessem$ ./bin/cordova_plist_to_config_xml /Repos/RisingJ/BetaGap/Generic/HyperLab.xcodeproj
> Converting /Repos/RisingJ/BetaGap/Generic/Cordova.plist to /Repos/RisingJ/BetaGap/Generic/config.xml.
> Traceback (most recent call last):
>   File "./bin/cordova_plist_to_config_xml", line 125, in <module>
>     main(sys.argv[1:])
>   File "./bin/cordova_plist_to_config_xml", line 115, in main
>     ConvertPlist(plist_file, config_file)
>   File "./bin/cordova_plist_to_config_xml", line 76, in ConvertPlist
>     plist = plistlib.readPlist(src_path)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
>     rootObject = p.parse(pathOrFile)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
>     parser.ParseFile(fileobj)
> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 9

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira