Unity IOS build failing in Xcode. (Windows to Mac)

Hello,

I’ve been following the course for Unity Mobile C# Developer Course.
On Lecture ’ Building To iOS’ I have not been able to get a successful build from Xcode to my iPhone.
For insight, I’ve been developing on Windows Unity for quite some time, but took interest in deploying/publishing an iPhone app. So following the same steps as in the course I’m using Unity on Windows. I’ve built the project with the same settings in the mentioned lecture and zipped the file. I used an external hard drive to transfer the zip file to my MacBook Laptop. From there I unzipped the file and opened the .xcodeproj in Xcode. I have my iPhone X plugged into my Mac laptop and shows up properly in Xcode. However when I hit Run/Build/PlayBtn in Xcode I am met with a build error:

'malformed archive TOC entry for _GC_new_proc, offset 313868672 is beyond end of file 285999104 file '/user/justinschmidt/Documents/iPhoneGames/BallLauncher/BallLauncher/Libraries/libiPhone-lib.a' clang: error: linker command failed with exit code 1 (use -v -to see invocation)

I’ve done quite a bit of ‘Googling’ to try to see if others have faced this issue and tried numerous steps but have not found a solution thus far.

I’m not sure if the file is possibly getting corrupted during the transfer from windows to mac?

I’ve followed the lecture step by step trying to keep versions as close as possible, although not much is mentioned in that regard during the IOS build lecture. Not sure if anyone has any thoughts or pointers on this, also if any other info is needed please let me know!

Thanks!

Tech Specs:
Unity 2020.2.4f1
Windows: 10 home ver 19041.1083
Mac: macOS Big Sur ver 11.4
iPhone X
XCode: 13.0 beta 3

Hi Justin,

Unfortunately i dont have a Mac to test but after some googling my end the only common solution i can find is that its a libraries issue and opening xcworkspace can solve the issue.
If this file is missing that would suggest this is why there is a libraries issue.
My guess would be that when it develops on windows it creates libraries for that specific platform and just copying over the project does not generate the library for Xcode and that is why there is an issue.

Let me know what you have there and if it solves it for you.

Hey Marc,

Thanks for the reply and for looking into this.
From what I can tell the xcworkspace file was there and I tried opening the project in Xcode that way but it did not seem to help at all. I did some more debugging myself but could not get the build to compile properly in Xcode.

What I ended up doing is installing Unity on my MacBook and loading the project in from my GitHub repo. I then built the project via Unity on Mac and was able to then successfully get it complied and deployed to my iPhone via the Xcode project that Unity generated.

I didn’t get a chance to fully compare both builds but in general, some files appear to be slightly different than the output from Windows. Particularly the .xcscheme inside the .xcodeproj, not sure if that was the only issue, however.

Another possible thing they may or may not have had an impact on the solution; I updated Unity to 2020.3.14f1 for both my Windows and Mac.

If I find anything else around this I’ll update this thread but I guess my only suggestion at the moment for anyone else that runs into this issue is to build the project on your mac. Transfer the project via some sort of source control (Github) / sharing a folder over your network / copying files through an external drive.

I also found this blog / possible solution for Windows users but I have not tested it.
(This is more straight to AppStore, so you wouldn’t be able to do any local playtesting before publishing I assume)
https://timebenter.github.io/tutorials/how-to-develop-a-unity-app-for-ios-on-windows/

Thanks again!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms