1
votes

I'm trying to build the google cardboard app to iOS

https://developers.google.com/cardboard/unity/get-started-ios#prerequisites

I could build the google cardboard app to android successfully but when I tried to deploy in Xcode when playing it after following the instructions, it gives the following error:

ld: library not found for -lvrunity

2
Can check that the file libvrunity.a exists in the Assets/Plugins/iOS directory? Does it get copied into your Xcode project? (It should appear in the Libraries folder.)smd
no it doesn't get copied, i guess it's build problem? I build it from windows unity, do I need to build it through mac unity?Alvin Wiltan
I think so. When you build fit iOS in Unity on Mac, it generates the Xcode project and copies a bunch of stuff in from Assets/Plugins/iOS. Then you build from that. So the libvrunitysmd
File should get copied when that happens.smd

2 Answers

0
votes

It's actually doable with a little bit of extra effort. As far as I'm concerned, building an iOS project on Windows can be correctly done, but it generates Library Search Paths incorrectly. So once you ready to build your iOS project on your Mac (which was created on a Windows machine), go to your Project -> Build Settings -> Search paths -> Library Search Paths and replace every backslash with a forward one, like this:

$(SRCROOT)/Libraries\Plugins/iOS

(I also added the $(SRCROOT)/Assets/Plugins/iOS path, since the library was there)

-1
votes

I tried building the xcode files from mac-unity and it works!

Apparently building it from windows-unity gives the issue