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

7

10

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

Ase answered 16/3, 2018 at 23:29 Comment(5)
From the Build Settings, switch your platform from whatever it is currently set to to iOS or Android.Bagwell
I had done it as it was stated in the steps but had not worked. Though now I tried it with the previous Daydream SDK 1.120 and now having another issue: "Virtual Reality SDK Daydream is not supported in Editor Play Mode. Please Build and run on a supported target device. Attempting to enable None instead." Is this expected ?Ase
File for bug report on for GoogleVR on their github page. Also mention your plugin and Unity versionBagwell
filed the issue with SDK 1.130 though considering SDK 1.120 had been around for a while I doubt that is also a bug. Any other thoughts?Ase
The problem is coming from their SDK so yesBagwell
L
20

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).
Lase answered 4/4, 2020 at 10:55 Comment(2)
If "iOS Build Support" is not enabled, then it can be added via "Add Module" option.Opia
#2 is a clutch find - thank you for documenting your hours long search so the rest of us don't have toIleum
U
4

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

Underweight answered 1/7, 2018 at 0:36 Comment(0)
S
2

I went ahead and changed the "Current Platform" to "iOS" in Unity Hub, This is a quick fix and it works now.

Change "Current Platform" to iOS Image: Change "Current Platform" to iOS Image

Stifle answered 12/9, 2019 at 17:2 Comment(0)
R
2

If you have installed IOS build through unity hub while the project is open, try restarting Unity Hub and Unity Editor. This solved my issue.

Rabblerouser answered 10/1, 2022 at 10:6 Comment(0)
H
1

This usually happens when iOS Build Support is not installed in Unity Hub

Haar answered 16/12, 2022 at 16:23 Comment(0)
L
0

I met this issue When useing unity-arkit-plugin to develop something, i did nothing but import this plugin it throw this error . And after i installed UnitySetup-IOS-Support-for-Editor-2017.3.0f3.pkg ,the issue fixed.

Loudhailer answered 1/4, 2018 at 1:31 Comment(0)
P
0

If IOS support is installed through Unity Hub after the editor is opened save the project, close and reopen.

Pulchia answered 18/7, 2023 at 22:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.