Log in or register to post comments

Unity Build Issues

December 14, 2016 - 9:20am #1

Hey,

I've briefly worked with Vuforia before and work with Unity a lot but this one has me stumped, I had my whole project working on PC, but couldn't export it for iOS, realised you can't do that and moved it to a Mac and tried to build and run from there, still doesn't work. So then I tried making a new Unity project, importing Vuforia from the Asset store and nothing else, just building one of the Sample projects, and it works sometimes. Generally it seems to work once per project and then starts throwing the error below, this isn't solved by closing Unity, closing XCode, deleting the DerivedData folder or even by restarting the Mac, at least not consistently.

Unity seems to be the cause of the issue because a 'build failed' notification comes up from XCode while Vuforia is running its linker, but there's no error messages within Unity saying anything went wrong and the only XCode build issue shown is the one below.

I really hope there's a simple answer to this one that I'm just missing, help of any kind is much appreciated, I've tried looking through here and not found anything like this so far:

Unity: OS X 5.5.0

iOS: 10.2

XCode: 8.2

Quote:

ld: can't open output file for writing: /Users/administrator/Library/Developer/Xcode/DerivedData/Unity-iPhone-fqfjddrffxdlricyonokdawudsoe/Build/Products/ReleaseForRunning-iphoneos/Vuforia.app/Vuforia, errno=21 for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)

Unity Build Issues

March 9, 2018 - 3:53am #4

If building on mac for ios in unity, make sure that in the build settings you disable "Metal Editor Support" under other settings for the ios platform.

Unity Build Issues

December 19, 2016 - 12:18am #3

Unfortunately that doesn't seem to have helped, to confirm, any other Unity project without Vuforia I have builds fine and can go through the whole iOS export correctly. Thank you for the suggestion though!

One thing I have noticed is that the XCode developer team needs to be set after the build has already failed from the Unity export process, I can't help but think that might be part of the issue as that causes a build issue if it's not set and might just kill the process? Is there any way to set that automatically for new XCode projects as setting it and then doing a new Build & Run from Unity wipes that information?

I have checked and the path for the error that I showed in my original message exists in every build I've tried up to the Vuforia.app/Vuforia, where the .app exists (though the Mac suggests it may be broken) but showing package contents doesn't show any sort of 'Vuforia' file?

Unity Build Issues

December 16, 2016 - 9:32am #2

It looks like it may be permissions problems, on the directory you trying to build to. I presume administrator is the user name you are logged in under? One tip would be to allow xcode to do legacy builds then it writes the build where you would really want it which is inside your xcode project.

Xcode->Preferences->Locations->Advanced select the legacy location then the builds end up in build/Release-iphoneos depending on the scheme you have chosen when you click on the project name. Unity seems to have added ReleaseForRunning recently it only just used to be the normal Release Debug options.

Log in or register to post comments