#if UNITY_IOS //&& !UNITY_EDITOR using System; using Azerion.BlueStack.API; using Azerion.BlueStack.Internal; namespace Azerion.BlueStack.Platforms.iOS { public class PreferenceClient : IPreferenceClient, IDisposable { private IntPtr _requestOptionsPtr; public PreferenceClient() { _requestOptionsPtr = Externs.BSUCreateRequestOptions(); } public void SetAge(int age) { Externs.BSUSetAge(this._requestOptionsPtr, age); } public void SetLocation(Location location, int consentFlag) { Externs.BSUSetLocation(this._requestOptionsPtr, location.Latitude, location.Longitude, consentFlag); } public void SetLanguage(string language) { Externs.BSULanguage(this._requestOptionsPtr, language); } public void SetGender(Gender gender) { Externs.BSUSetGender(this._requestOptionsPtr, (int)gender); } public void SetKeyword(string keyword) { Externs.BSUSetKeyword(this._requestOptionsPtr, keyword); } public void SetContentUrl(string contentUrl) { Externs.BSUSetContentUrl(this._requestOptionsPtr, contentUrl); } public IntPtr GetPreferenceClientPtr() { return this._requestOptionsPtr; } internal void DestroyPreference() { Externs.BSUDestroyRequestOptions(this._requestOptionsPtr); this._requestOptionsPtr = IntPtr.Zero; } public void Destroy() { this.DestroyPreference(); } public void Dispose() { this.DestroyPreference(); } } } #endif