Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
MaoLux's avatar
MaoLux
Honored Guest
1 year ago

Meta60.0 Unity22.3.16f1 macOS Build fails. Issue with MetaXRAudio info.plist format.

Crossplatform project (Quest2 standalone, iOs, Win, macOS).

MetaSDK features used in Quest2 standalone only but present in scenes.

Built successful before Meta60.0 upgrade from Oculus 57.0

 

Building Builds/OSX/XYZ.app/Contents/PlugIns/MetaXRAudioUnity.bundle/Contents/Info.plist failed with output:

System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)

   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()

   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

   at System.Xml.XmlTextReaderImpl.Read()

   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)

   at System.Xml.Linq.XDocument.Load(XmlReader reader)

   at UnityEditor.iOS.Xcode.PlistDocument.ParseXmlNoDtd(String text) in /Users/bokken/build/output/unity/unity/External/XcodeAPI/Xcode/PlistParser.cs:line 199

   at UnityEditor.iOS.Xcode.PlistDocument.ReadFromString(String text) in /Users/bokken/build/output/unity/unity/External/XcodeAPI/Xcode/PlistParser.cs:line 330

   at UnityEditor.OSXStandalone.CodeSigning.BundleSigner.ParsePListFile(Byte[]& plistFileContents, String& executablePath, String& bundleIdentifier) in /Users/bokken/build/output/unity/unity/Platforms/OSX/CodeSigning/BundleSigner.cs:line 91

   at UnityEditor.OSXStandalone.CodeSigning.BundleSigner.Sign(SignFlags signFlags, BundleSignTarget& signedBundle) in /Users/bokken/build/output/unity/unity/Platforms/OSX/CodeSigning/BundleSigner.cs:line 51

   at MacOSCodeSignBundleCopy.Run(CSharpActionContext ctx, Data data) in /Users/bokken/build/output/unity/unity/Platforms/OSX/MacStandalonePlayerBuildProgram/MacOSCodeSigning.cs:line 32

 

UnityEditor.GenericMenu:CatchMenu (object,string[],int) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/GenericMenu.cs:127)

 

GaveGPT Info.plist to analyse and it replied : 
The Info.plist file starts with bplist00, indicating that it is a binary property list (plist) file, not a standard XML plist file. This is why the XML parser fails to read it, as it expects an XML format. Unity's build process and the code attempting to parse the Info.plist might not be equipped to handle binary plist formats directly, hence the error.

To resolve this issue, you will need to convert the binary plist file to an XML format that Unity and its XML parser can understand. macOS provides a command-line tool called plutil that can convert binary plist files to XML format. 


if facing this issue, do the following:

in Terminal, run : plutil -convert xml1 YOUR_PROJECT_FOLDER/Library/PackageCache/com.meta.xr.sdk.audio@60.0.0/Runtime/Plugins/MetaXRAudioUnity.bundle/Contents/Info.plist

Now builds sucessfully.

1 Reply

  • Thank you so much for sharing this. I ran into the same issue and it would have taken a loooong time to come to this solution. I assumed the fix would be to exclude this bundle from macos builds altogether, but my initial attempts at that weren't panning out.

    It definitely feels wrong to be altering the package file, but I'm grateful to have a workaround.