Can't Append to Xcode with 4.6.2f1

Hello,

I installed 4.6.2f1 build the Xcode project added some native code, and now can’t Append to Xcode (6.1)

Error building Player: ArgumentException: An Element with the same key already exists in the dictionary.

On Issue Tacker:

but still not fixed, don’t know where to go or what to fix or where to look at.

Any kind of help please.

Well Solved!

Enable IL2CPP in player settings.

Note that you have build a new xcode project with IL2CPP enabled, and can append later on.

Can’t append to a project where IL2CPP was disabled at first.

so we have to redo the native work at least once again!

For me, I didn’t have the option of rebuilding, because I have to do quite a few post-build things to the Unity generated code. For me, this problem was specifically caused by adding files to my XCode project after it was created the first time (adding files through XCode). I’m not sure, but I found duplicate entries in the project XML file, removed them, and it fixed the problem.

Look in your XCode project file (located at your_export_dir/Unity-iPhone.xcodeproj/project.pbxproj.) I went to the CustomTemplate section and checked each entry starting at the top that I knew I had added folders for manually, then found them duplicated below by searching for “name = whatever” where whatever is the value that is between /* and */ in the CustomTemplate section. There were two sections in the XML below that that said “name = whatever”, so that’s where Unity is failing to build. After removing the offending files/folders, you may have to add them back. In my case, the same files were listed twice for some reason.

Building to the project root (not a sub folder, not a folder outside of the root) fixed it for me: Unity Issue Tracker - [Personal] The Append feature is always disabled if building to any folder that is not the project root