#if UNITY_IOS //&& !UNITY_EDITOR using System; using System.Reflection; using Azerion.BlueStack.Internal; using UnityEngine; namespace Azerion.BlueStack.Platforms.iOS { public class ClientsFactory : IClientsFactory { public IBlueStackClient CreateBlueStackClient() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return BlueStackClient.Instance; } throw new InvalidOperationException(@"Called " + MethodBase.GetCurrentMethod()?.Name + " on non-iOS runtime"); } public IRewardedVideoAdClient CreatRewardedVideoAdClient() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return new RewardedVideoAdClient(); } throw new InvalidOperationException(@"Called " + MethodBase.GetCurrentMethod()?.Name + " on non-iOS runtime"); } public IInterstitialAdClient CreatInterstitialAdClient() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return new InterstitialAdClient(); } throw new InvalidOperationException(@"Called " + MethodBase.GetCurrentMethod()?.Name + " on non-iOS runtime"); } public IBannerAdClient CreatBannerAdClient() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return new BannerAdClient(); } throw new InvalidOperationException(@"Called " + MethodBase.GetCurrentMethod()?.Name + " on non-iOS runtime"); } public INativeAdClient CreateNativeAdClient() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return new NativeAdClient(); } throw new InvalidOperationException(@"Called " + MethodBase.GetCurrentMethod()?.Name + " on non-iOS runtime"); } public IPreferenceClient CreateIPreferenceClient() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return new PreferenceClient(); } throw new InvalidOperationException(@"Called " + MethodBase.GetCurrentMethod()?.Name + " on non-iOS runtime"); } } } #endif