GoogleCardboard app refuses to work for iOS build - Xcode errors

This is driving me crazy.

I’m trying to convert an app from an android VR environment (built on Windows) to a iOS one. I thought, not so hard. 3 days later I have made no progress.

So I’m trying to even get the demo cardboard scene to upload onto an iPhone. It seems to build successfully, with errors, but then never gets onto the phone itself.

In Xcode I get a lot of

/Users/alex/Desktop/New Unity
Project444/6/Classes/Native/Bulk_UnityEngineMetadata_1.cpp:37383:66:
Integer literal is too large to be
represented in a signed integer type,
interpreting as unsigned

and a bunch of

Undefined symbols for architecture
armv7:
“_CTFontGetGlyphsForCharacters”,
referenced from: l302 in
libGoogleKitCore.a(GoogleKitCore.o)

I think it may be linked to some errors in Unity where it says

Assets/Cardboard/Scripts/CardboardEye.cs(60,22):
warning CS0109: The member
`CardboardEye.camera’ does not hide an
inherited member. The new keyword is
not required

Any help would be greatly appreciated, I am tearing my hair out.
its such a simple scene I am breaking down `

Regarding the thought of the eye error in unity make causing the problem. I do recall having that problem a while back but it not affecting the build for me. you case may be different.

I was getting a lot of crazy errors as well but they went away I made sure to follow the Xcode instructions here.
https://developers.google.com/cardboard/unity/get-started-ios

On step 8 of the Xcode instructions I found that the add files to button is actually not under the file menu but it’s there when you right click the unity project on the left column.

Also after completing all the steps the large amount of errors got fixed for me but I found i needed to comment out the line
REGISTER_USER_FUNC(_CanOpenURL);

which I found in RegisterMonoModules()

I hope a real fix to this problem can be found as I most likely killing a key feature of opening web links by doing that.

Let me know if this does works or does not for you. The cardboard sdk is super powerful and it’s nice it’s on iOS. As a whole the system seem to have some key UX problems that I’m working on sorting out for the cardboard when built on iOS.

You will most likly encounter once you get it to build to work :slight_smile:

Another solution worth trying would be redownloading the stable latest version (non beta) of Xcode.

The _CTFontGetGlyphsForCharacters error is because you need to add CoreText.framework to the Xcode project’s link settings. See https://developers.google.com/cardboard/unity/get-started-ios for the instructions on how to set up Xcode for Cardboard iOS projects.

hi! Adding the CoreText.framework did work - in a fashion! I’m an idiot for not following the instructions.

However, now I have the app actually on the phone (amazing!) the google cardboard ‘camera’ slips around the scene, seemingly controlled by the motion of the phone. Unsure what’s happening there - but a big breaktrhough for me actually getting it to run. I’m so close for it to work properly!