Hi,
I am trying to add Heyzap to my project. With Android all works fine. But when I am trying to export iOS project, I get an error

Assets/Plugins/HeyzapAds.cs(72,5): error CS0103: The name `HeyzapAdsIOS’ does not exist in the current context

HeyzapAdsIOS.showMediationTestSuite();

What might the problem be?

Thank you for your help.

Hi there, sorry to hear that you’re having this issue! We just released an SDK update today that should prevent this from happening. If the error persists, please contact us at support@heyzap.com and we’ll get to the bottom of it ASAP. Thanks!

Hi, I work at Heyzap. This was a bug in our SDK that we’ve fixed in version 8.0.0, which you can download here.

What was happening was that we were conditionally compiling iOS-only code using the UNITY_IPHONE macro:

public static void showMediationTestSuite() {
  #if UNITY_ANDROID
  HeyzapAdsAndroid.showMediationTestSuite();
  #endif

  #if UNITY_IPHONE
  HeyzapAdsIOS.showMediationTestSuite();
  #endif
}

Unfortunately, UNITY_IPHONE is true when deploying to the Unity Editor. To fix this, we added && !UNITY_EDITOR to our code like so:

#if UNITY_IPHONE && !UNITY_EDITOR
HeyzapAdsIOS.showMediationTestSuite();
#endif

We’ve known about this UNITY_IPHONE/UNITY_EDITOR weirdness for awhile, so the rest of our C# code follows this pattern, but this one particular case slipped by us. Sorry about that.