Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error CS0234: The type or namespace name `iOS' does not exist in the namespace `UnityEditor'. Are you missing an assembly reference?

I have installed the latest versions of Unity (2017.3.1), Daydream SDKs (GVR SDK for Unity v1.130.0) and followed the steps here: https://developers.google.com/vr/develop/unity/get-started#configure_build_settings_and_player_settings

However when I press Play I get the following error, ideas on what is the reason & how to fix it?

Assets/GoogleVR/Editor/GvrBuildProcessor.cs(20,19): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'UnityEditor'. Are you missing an assembly reference?

Edit: Issue fixed after a few hours of submission on GitHub with the release of GVR SDK for Unity v1.130.1

like image 499
Reha Avatar asked Mar 16 '18 23:03

Reha


2 Answers

If you're facing with this problem there are 2 steps to solve it:

  1. Make sure that "iOS Build Support" is checked in Unity Hub -> Installs as Adam mentioned (if U're developing for iOS platform then this option most definitely is already checked).
  2. Place your script in Assets -> Editor folder. UnityEditor.iOS.Xcode namespace cannot be used in your main project. It works only in special Assembly-CSharp-Editor project intended to modify native Xcode project. (That's the option that worked for me after searching a ton of forums).
like image 184
Shpand Avatar answered Oct 23 '22 03:10

Shpand


The Official Solution: https://forum.unity.com/threads/unityeditor-ios-xcode-ios-namespace-doesnt-exist.365381/

Step by step I did: Figure 1 shows the Unity Download Assistent installation file that should be run.

Figure 1 - Unity Download Assistant

Figure 2 shows the "iOS Build Support" option that should be checked for installation.

Figure 2 - Unity Install iOS Build Support

like image 3
Adam E. Avatar answered Oct 23 '22 04:10

Adam E.