onevcat / XUPorter

Add files and frameworks to your Xcode project after it is generated by Unity 3D.
http://onevcat.com/2012/12/xuporter/
MIT License
596 stars 241 forks source link

Null reference exception (related to plist) #54

Closed cdes closed 9 years ago

cdes commented 9 years ago

I'm using Unity 5.

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.XCodeEditor.XCMod.get_libs () (at Assets/Editor/iOS/XUPorter/XCMod.cs:32)
UnityEditor.XCodeEditor.XCProject.ApplyMod (System.String pbxmod) (at Assets/Editor/iOS/XUPorter/XCProject.cs:703)
XCodePostProcess.OnPostProcessBuild (BuildTarget target, System.String pathToBuiltProject) (at Assets/Editor/iOS/XUPorter/XCodePostProcess.cs:29)
UnityEditor.HostView:OnGUI()

Here's my projmods file:

{
    "plist": {
        "urltype" : [
            {
                "role": "Editor",
                "name" : "ahmed",
                "schemes":["ahmed"]
            }
        ],
    },
}
cdes commented 9 years ago

The issue was happening because I had 2 projmods files in the project. One has everything except for the "plist" entry, the other only have the plist entry.

When I merged them into a single file, everything went smoothly.