Unity AppTrackingTRansparency отображается на Iphone, но НЕ на IpadC#

Место общения программистов C#
Ответить
Anonymous
 Unity AppTrackingTRansparency отображается на Iphone, но НЕ на Ipad

Сообщение Anonymous »

Я пытаюсь опубликовать свое первое приложение для iOS и столкнулся с проблемой, когда AppTrackingTransparency отображается конкретно на Ipad.
Используется iOS 16
Проверено на Iphone 12.11.13, работает нормально, появляется уведомление AppTracking.
На любом iPad надпись «Разрешить/Не разрешать» никогда не отображается, а отображается только фон.
Есть ли разница между тем, как Apple обрабатывает запрос на Ipad/Iphone? Любая информация/помощь была бы полезна. Это единственное, что стоит между мной и публикацией моего приложения!
Код:
using Unity.Advertisement.IosSupport.Components;
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

`namespace Unity.Advertisement.IosSupport.Samples
{
///
/// This component will trigger the context screen to appear when the scene starts,
/// if the user hasn't already responded to the iOS tracking dialog.
///
public class ContextScreenManager : MonoBehaviour
{
///
/// The prefab that will be instantiated by this component.
/// The prefab has to have an ContextScreenView component on its root GameObject.
///
public ContextScreenView contextScreenPrefab;

void Start()
{
// check with iOS to see if the user has accepted or declined tracking
var status = ATTrackingStatusBinding.GetAuthorizationTrackingStatus();

if (status == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
{
var contextScreen = Instantiate(contextScreenPrefab).GetComponent();

// after the Continue button is pressed, and the tracking request
// has been sent, automatically destroy the popup to conserve memory
contextScreen.sentTrackingAuthorizationRequest += () => Destroy(contextScreen.gameObject);
}
StartCoroutine(LoadNextScene());
}

private IEnumerator LoadNextScene()
{
Debug.Log("load next scene called");
var status = ATTrackingStatusBinding.GetAuthorizationTrackingStatus();

while (status == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
{
Debug.Log("not determined");
status = ATTrackingStatusBinding.GetAuthorizationTrackingStatus();
yield return null;
}
if(status == ATTrackingStatusBinding.AuthorizationTrackingStatus.DENIED || status == ATTrackingStatusBinding.AuthorizationTrackingStatus.RESTRICTED || status == ATTrackingStatusBinding.AuthorizationTrackingStatus.RESTRICTED)
{
Debug.Log("consent is no");
PlayerPrefs.SetString("adConsent", "N");
}
else
{
Debug.Log("consent is yes");
PlayerPrefs.SetString("adConsent", "Y");
}
SceneManager.LoadScene(1);
yield return null;
}
}
}

using System;
using UnityEngine;

namespace Unity.Advertisement.IosSupport.Components
{
///
/// This component controls an iOS App Tracking Transparency context screen.
/// You should only have one of these in your app.
///
public sealed class ContextScreenView : MonoBehaviour
{
///
/// This event will be invoked after the ContinueButton is clicked
/// and after the tracking authorization request has been sent.
/// It's a good idea to subscribe to this event so you can destroy
/// this GameObject to free up memory after it's no longer needed.
/// Once the tracking authorization request has been sent, there's no
/// need for this popup again until the app is uninstalled and reinstalled.
///
public event Action sentTrackingAuthorizationRequest;

public void RequestAuthorizationTracking()
{
Debug.Log("Unity iOS Support: Requesting iOS App Tracking Transparency native dialog. For Global Leaderboards & Revives this has to be accepted.");

ATTrackingStatusBinding.RequestAuthorizationTracking();

sentTrackingAuthorizationRequest?.Invoke();
}
}
}


Подробнее здесь: https://stackoverflow.com/questions/759 ... t-not-ipad
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»