I was building my iOS project without problem a few days ago. I have added some small bits (5 simple models, amended some code and prefabs), but now a build fails. It opens Xcode then goes back to Unity and stays there, with the spinning beachball. Eventually it fails with the message:
I checked the log, and the section below seems the relevant bit. The first 2 lines appear repeatedly, but I have only included the last few.
I am using Unity 4.3.2, Xcode 5.1.
Any suggestions?
Connecting to Xcode
Disconnecting
Connecting to Xcode
Disconnecting
Connecting to Xcode
Disconnecting
Waiting for plugin timed out
2014-03-16 19:32:40.084 Unity[505:707] Checking <NSRunningApplication: 0xe153d90 (com.apple.dt.Xcode - 602)>
Connecting to Xcode
Disconnecting
Close all open unity project in Xcode failed. System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at UnityEditor.iOS.Xcode4Controller.Connect () [0x00039] in /Applications/buildAgent/work/d3d49558e4d408f4/PlatformDependent/iPhonePlayer/Extensions/Managed/BuildPostProcessor.cs:53
at UnityEditor.iOS.Xcode4Controller.CloseAllOpenUnityProjects () [0x00006] in /Applications/buildAgent/work/d3d49558e4d408f4/PlatformDependent/iPhonePlayer/Extensions/Managed/BuildPostProcessor.cs:173
at UnityEditor.PostProcessiPhonePlayer.CloseUnityProjectsInXcode () [0x00005] in /Applications/buildAgent/work/d3d49558e4d408f4/PlatformDependent/iPhonePlayer/Extensions/Managed/BuildPostProcessor.cs:479
Connecting to Xcode
Disconnecting
System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at UnityEditor.iOS.Xcode4Controller.Connect () [0x00039] in /Applications/buildAgent/work/d3d49558e4d408f4/PlatformDependent/iPhonePlayer/Extensions/Managed/BuildPostProcessor.cs:53
at UnityEditor.iOS.Xcode4Controller.OpenProject (System.String path) [0x00006] in /Applications/buildAgent/work/d3d49558e4d408f4/PlatformDependent/iPhonePlayer/Extensions/Managed/BuildPostProcessor.cs:91
at UnityEditor.PostProcessiPhonePlayer.LaunchInXcode (BuildTarget target, System.String path) [0x0002a] in /Applications/buildAgent/work/d3d49558e4d408f4/PlatformDependent/iPhonePlayer/Extensions/Managed/BuildPostProcessor.cs:506
UnityException: Launching iOS project via Xcode4 failed. Check editor log for details.
(Filename: Line: -1)
System memory in use before: 95.7 MB.
Unloading 72 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
System memory in use after: 86.6 MB.
Unloading 13 unused Assets to reduce memory usage. Loaded Objects now: 2099.
Total: 58.529350 ms (FindLiveObjects: 0.095172 ms CreateObjectMapping: 0.057931 ms MarkObjects: 6.202006 ms DeleteObjects: 0.143366 ms)
System memory in use before: 86.3 MB.
Unloading 0 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
System memory in use after: 86.5 MB.
Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 2098.
Total: 8.643686 ms (FindLiveObjects: 0.209528 ms CreateObjectMapping: 0.046842 ms MarkObjects: 8.327713 ms DeleteObjects: 0.012043 ms)
- starting compile Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll, for buildtarget 9
System memory in use before: 86.4 MB.
Unloading 1 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
System memory in use after: 86.5 MB.
Unloading 5 unused Assets to reduce memory usage. Loaded Objects now: 2098.
Total: 11.547914 ms (FindLiveObjects: 0.367000 ms CreateObjectMapping: 0.318093 ms MarkObjects: 9.926044 ms DeleteObjects: 0.559173 ms)
*** Cancelled 'Build.Player.iPhonePlayer' in 54 seconds
I tried a project I was working on last week, and now it is timing out also. I am not sure I had done a build since updating Xcode to 5.1. Are there any issues with the latest Xcode?
Yes, there are still problems with the latest xcode: the âbuild and runâ does not start the xcode build automatically. You have to start it manually.
Hope they fix it somedayâŚ
I have removed the Prime31 Game Center plugin I am using just in case. It has not solved the problem, but I noticed something appear that I have not seen before.
A progress bar appeared along with Xcode opening, labelled âDeploying Playerâ. It remained there at about 20% progress after Xcode closed, and stayed for long time while the spinning beach ball was showing. It only disappeared as Xcode opened again (showing the project selection screen) and the UnityException: Launching iOS project via Xcode4 failed appeared in the Unity console.
I have reverted to Xcode 5.0.2, which allows me to do builds again.
To do that:
Delete Xcode.
Restart your Mac.
Log into your developer account.
At the bottom of the area for downloading Xcode 5.1, you will see a link asking if you are looking for an older version. Click on that and download the older version, then install.
Thanks @moonjump for finding a temporary solution but the problem seems to be that with 5.0.2 you cannot develop on devices with the newest iOS version, can you? At least that was the reason I updated Xcode in the first place⌠I wonder why we are the only ones who seems to have this problem? Are we the only ones who updated Xcode
I have had a response to my bug report. It has been closed as a duplicate, so we are not the only ones. The following 2 options were given as workarounds, although I have not tested them as I am staying with 5.0.2 for the moment.
Thank you for the solution! This is probably the 3rd time this has happened to me after upgrading Xcode, and usually I just wait for a Unity update to resolve it. In an effort to not be held up by this issue again, I just wanted to document what I think is the solution for future Xcode updates here (for myself and others).
I think the value Mantas recommended in step 3 comes from:
Xcode.app/Contents/Info.plist
Look for the DVTPluginCompatibilityUUID key and add its value into the plugin info like Mantas suggested.