onevcat/XUPorter

Update example mods for plist support

Opened this issue · 2 comments

Example mods should have "plist": {} field now. Otherwise it runs with error:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.XCodeEditor.XCPlist.Process (System.Collections.Hashtable plist) (at Assets/XUPorter/Editor/XCPlist.cs:34)
UnityEditor.XCodeEditor.XCProject.ApplyMod (UnityEditor.XCodeEditor.XCMod mod) (at Assets/XUPorter/Editor/XCProject.cs:780)
UnityEditor.XCodeEditor.XCProject.ApplyMod (System.String pbxmod) (at Assets/XUPorter/Editor/XCProject.cs:706)
XCodePostProcess.OnPostProcessBuild (BuildTarget target, System.String pathToBuiltProject) (at Assets/XUPorter/Editor/XCodePostProcess.cs:29)
UnityEditor.HostView:OnGUI()

Was confused when tried it first time.

I did also run into to this

Better yet, "ApplyMod" should be updated to check for null ... kind of redundant to have a projmods with a bunch of empty arrays when just one key is needed.