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

Reha picture Reha · Mar 17, 2018 · Viewed 17.3k times · Source

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

Answer

Shpand picture Shpand · Apr 4, 2020

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).