Search Unity

Exception in PlistParser [SOLVED]

Discussion in 'iOS and tvOS' started by oakshiro, May 4, 2017.

  1. oakshiro

    oakshiro

    Joined:
    Dec 9, 2008
    Posts:
    20
    Hi there,

    I have quite a problem while trying to build my project and open it in XCode.
    Strangely, when It builds I see no version number nor version code, and the bundle package name, instead of com.oakshiro.mygame is changed to com.unity3d.mygame.

    I suspected this is why I got a constant 22421 error while trying to upload it to the app store, so I investigated further in Unity itself.

    It just happens that, even though the xcode project is created, this exception appears in the log:

    ArgumentException: Input contains invalid character at 2 : 
    System.Xml.XmlTextWriter.WriteCheckedBuffer (System.Char[] text, Int32 idx, Int32 length)
    System.Xml.XmlTextWriter.WriteCheckedString (System.String s)
    System.Xml.XmlTextWriter.WriteEscapedString (System.String text, Boolean isAttribute)
    System.Xml.XmlTextWriter.WriteString (System.String text)
    System.Xml.Linq.XText.WriteTo (System.Xml.XmlWriter w)
    System.Xml.Linq.XElement.WriteTo (System.Xml.XmlWriter w)
    System.Xml.Linq.XElement.WriteTo (System.Xml.XmlWriter w)
    System.Xml.Linq.XElement.WriteTo (System.Xml.XmlWriter w)
    System.Xml.Linq.XNode.ToString (SaveOptions options)
    System.Xml.Linq.XNode.ToString ()
    System.String.Concat (System.Object[] args) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/String.cs:2189)
    UnityEditor.iOS.Xcode.PlistDocument.CleanDtdToString (System.Xml.Linq.XDocument doc) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PlistParser.cs:178)
    UnityEditor.iOS.Xcode.PlistDocument.WriteToString () (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PlistParser.cs:335)
    UnityEditor.iOS.PlistUpdater.UpdateString (System.String text, CustomData data) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/FileUpdaters.cs:563)
    UnityEditor.iOS.PostProcessiPhonePlayer.UpdateInfoPlist (System.String filename, BuildSettings bs, System.String iPhoneLaunchStoryboardName, System.String iPadLaunchStoryboardName) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:2649)
    UnityEditor.HostView:OnGUI()


    that character ,  , is like a double ! "!!" and it is nowhere in the build settings or the code...

    I tried to upload it to cloud build and i've got an error when using the app uploader to upload the generated ipa telling me the package has no version code nor version number.

    Also, I tried to delete the whole projectsettings folder, but i think it did nothing because all the fields were filled in right away, so i suppose that to reset the build settings I should delete a folder elsewhere.

    Any clue what should I do?

    BTW, i am using Unity 5.6.0.f3

    Thanks!
     
    Last edited: May 4, 2017
  2. oakshiro

    oakshiro

    Joined:
    Dec 9, 2008
    Posts:
    20
    Finally I got.
    I managed to make it work by deleting all playerprefs archives, projectsettings folder and reentering all info.
    Now it builds correctly.

    Cheers all
     
  3. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    If anyone else has this issue, I fixed it by removing the spurious characters from the iOS version in the ProjectSettings.asset.

    Strangely enough, editing the version fields (either of them) in the inspector would not fix this regardless of what I did in the Editor, those characters were always being appended (or were residual) to the iOS version in the ProjectSettings.asset file but could not be seen in the inspector.
     
    Last edited: Jan 29, 2018
  4. hello_unity154

    hello_unity154

    Joined:
    May 8, 2018
    Posts:
    1
    I am having the same problem, could you explain some more what characters did you remove?
    I have this header in the ProjectSettings.asset:


    %YAML 1.1
    %TAG !u! tag:unity3d.com,2011:
    --- !u!129 &1
    PlayerSettings:
    m_ObjectHideFlags: 0
    serializedVersion: 14