Unity3d 5.1.1 p3 - No Append & Cannot debug in MonoDev

Hi

I just upgraded to Unity3d 5.1.1 p3 yesterday night. I’m using Xcode 6.4.

I cannot Append a build anymore…it keeps saying that the current build is different and that I therefore need to do a Replace - I have used this feature SO many times, as I’m currently is having a build issue so I need to so some manual things to the outputted Xcode project to make it build (add some files and some changes to the project file). This have been working for weeks…until this patch.

It might be related to each other, but I cannot attach the debugger in MonoDev to my device (iPhone 6, ISO 8.4) anymore either…it use to work.

I have tried this both on my real project and a fairly clean and simple project - not working in any of them.

Am I the only one with this problem?

Nope. I Can’t append either. The support for append has always been sketchy. It often breaks with upgrades to XCode or Unity.

I finally gave up and wrote an editor post build script.

There is an XCode editor that comes with the Facebook SDK that I’m using. It seems to be a fork of the following repo:

Not sure which version(FB SDK/repo) is more up to date… I grabbed the one from the FB SDK and it seems to work.

If you need to edit the Info.plist, you can use System.Xml;
System.Xml will end up adding some extra ‘[ ]’ at the end of the first line, which will cause XCode not to be able to read the file, but you can get rid of the ‘[ ]’ with this:

if(doc.DocumentType !=null)
{
    varname=doc.DocumentType.Name;
    varpublicId=doc.DocumentType.PublicId;
    varsystemId=doc.DocumentType.SystemId;
    varparent=doc.DocumentType.ParentNode;
    varnewDoctype=doc.CreateDocumentType(name,publicId,systemId,null);
    parent.ReplaceChild(newDoctype,doc.DocumentType);
}

Hello. This issue has been fixed; the fix will most likely appear in 5.1.2p1. As a workaround, you can append to builds that are made into a directory that is directly inside the project directory, e.g. ProjectDirectory/BuildDir.

Thanks, this make the “Append” button actually be enabled - that’s great!

But sadly, I run into the other problem with Append that I have seen issues about (also as noted here: Unity Issue Tracker - [iOS][Deployment Management] Append doesn't work if build is in different folder than project).

I have already created a issue via the bug reporter in Unity3d, so guess you guys at Unity3d knows this, but I’ll put it here of others to see.

Because, when this Append button get enabled via the above workaround, I get these exceptions:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.iOS.Xcode.PBXProject.GetGroupChildrenFiles (System.String projectPath)
UnityEditor.iOS.PostProcessiPhonePlayer.BuildXCodeProject (UnityEditor.iOS.ProjectPaths paths, UnityEditor.iOS.IncludedFileList includedFiles, System.Collections.Generic.List`1 frameworks, System.String sdkVersion, System.String targetOS, System.String productName, Boolean useIl2Cpp, Boolean installInBuildFolder, Boolean useSymlinks, Boolean isGameCenterUsed)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()

Error building Player: NullReferenceException: Object reference not set to an instance of an object

This is known issue. If everything goes well, the fix will appear in Unity 5.1.2

Still no fix? (using 5.2.1p1) this is VERY annoying!

Well, Append and debug have been working for me for long now. Just updated to 5.2.1p1 today and both Append and debug works in this latest version too - at least for me.