Unity 2018.2
Make sure you have installed iOS build support, and wrap the code where you use xCode staff with #if UNITY_EDITOR_OSX
Unity 2018.2
Make sure you have installed iOS build support, and wrap the code where you use xCode staff with #if UNITY_EDITOR_OSX