블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2731)
Unity3D (814)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (57)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (51)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
03-29 07:22

Unity 2021.3.35f1

GoogleMobileAds 8.7.0

----

 

 

GDPR 동의 로직 추가하고 iOS 검수 넣었더니 리젝 됐다.

사유는 대충 정리하면,

GDPR 팝업에서 '거부'를 했는데, 같은 이슈인 'IDFA(AppTrackingTransparency)' 동의 여부를 다시 묻는 건 문제다.

라는 말이었습니다.

 

이전엔 GoogleMobileAds에서 제대로 처리안해줘서 같은 이슈 (아래 링크 참고) 가 있었던 것 같은데, 현재 최신 버전에서는 수정된걸로 보인다.

[참고] https://groups.google.com/g/google-admob-ads-sdk/c/huUa7eyMTEE

 

URGENT: Apple App Rejected - UMP SDK Using both GDPR & IDFA/ATT Causing Rejection

Hi Justin, thank you for the update and for your work to get this resolved! Unfortunately, the "short term recommendation" provided would be a significant ad revenue impact, and so it is not viable. We do need to call requestConsentInfoUpdate to get the I

groups.google.com

 

아무튼,

나의 경우는 GDPR은 GoogleMobileAds를 사용하고, IDFA 관련은 다른 SDK에서 처리하고 있어서 유기적으로 제어되지 않고 있었다.

 

GoogleMobileAds-UMP를 확인해보니,

IDFA(App Tracking Transparency) 관련 처리도 GoogleMobileAds에서 같이해주면 GDPR과 IDFA(ATT) 동의를 알아서 유기적으로 처리해준다.

 

GDPR 로직을 추가하고, IDFA 관련 Admob 설정을 추가(소스 로직 추가는 없음)하고, 테스트 해보니 아래와 같은 형태로 진행된다.

(로직상으로는 GDPR 관련 체크 로직만 있다. GDPR 체크 후에 필요하면 IDFA 로직을 알아서 타는 것 같다.)

 

GDPR 관련 설정은 아래 링크를 참고하자.

[링크] [GoogleMobileAds] Unity-Google-UMP-Check(GDPR)

 

[GoogleMobileAds] Unity-Google-UMP-Check(GDPR)

2024년 1월 16일까지(참조:https://support.google.com/admob/answer/14189727?hl=ko) Admob을 사용하려면 유저에게 GDPR 동의를 받으라고 하는 것 같다. 그래서 Google에서 관련 SDK를 내놓은게 UMP(User Messaging Platform) SDK

blueasa.tistory.com

 

[GDPR/IDFA 활성화 시, 진행 Flow]

1) EEA(European Economic Area, 유럽 경제 지역) 경우

    1-1) GDPR 팝업 Open

            1-1-1) GDPR 동의 시 -> ATT 동의 팝업 Open

            1-1-2) GDPR 비동의 시 -> ATT 동의 팝업 Skip(뜨지 않음)

 

2) EEA(European Economic Area, 유럽 경제 지역)가 아닌 경우

    2-1) IDFA 메시지 (안내) 팝업 Open

    2-2) ATT(App Tracking Transparency) 동의 팝업 Open

 

애플 검수 과정에서 요구하는 사항인 GDPR을 거부했을 때, IDFA 동의 팝업이 뜨지 않아야 된다는 조건에 만족하고 있다.

 

[결론]

GoogleMobileAds-UMP로 GDPR과 IDFA를 처리하면 심플하게 유기적으로 처리 가능하다.

적극 활용하자.

 

 

[참조] https://docs.adxcorp.kr/appendix/ump-user-messaging-platform#2.-idfa

 

UMP (User Messaging Platform) - ADX Library

IDFA 메시지 작성은 선택사항이지만, GDPR 메시지 사용 설정을 할 경우, IDFA 메시지 작성도 같이 작성하십시오. 애드몹 UMP의 GDPR 동의 화면이 보이는 상태에서, 프로그래밍 방식으로 수동으로 ATT (AP

docs.adxcorp.kr

[참조] https://docs.adxcorp.kr/ios/supporting-ios-14/app-tracking-transparency

 

App Tracking Transparency - ADX Library

애드몹 UMP (User Messaging Platform)의 IDFA 메시지 기능 활성화 시, 특별한 프로그래밍 코딩을 하지 않아도, UMP 내부에서 자동으로 ATT 동의 알림 요청 기능을 수행하므로, 이 단계(Step4)와 다음 단계 (Step

docs.adxcorp.kr

 

반응형
Posted by blueasa
, |

​With Apple’s incoming changes to the requirements for use of IDFA and needing to request users permission via App Tracking Transparency popup which is incoming at some point in early 2021. Apps need to start to prepare to the incoming changes.

​So how do you add a IDFA App Tracking Transparency popup from a Unity app?

At the moment there is no build in Unity method that will trigger the notification, There is however a preview package!

​As a note App Tracking Transparency is only required on IOS 14 devices, Altough this won’t causing issues on any lower OS version it won’t trigger the popup. If you don’t have access to a IOS 14 device you can test this with the XCode Emulators.​

1. Download Unity IOS Support Package

​Download the com.unity.ads.ios.support library from Github. This is current in preview and won’t be found directly from the package manager.

Unzip this into a folder outside your Asset Folder.

​Note it is best to make sure these files are checking into source control we will be using a relative path from Unity package manager.​

2. Add to Package Manager

​Now in you’re unity project go Windows->Package Manger.

​​

Then press the plus button and add from disk and navigate to the package.json file within the com.unity.ads.ios.support that we just unzipped.

​​

Unity will then import the package, Because we have imported the file from within the base Unity Project file the file has been direct to a relative path, if you however place this file outside this folder you will need to edit the Packages/manifest.json file to make it relative.

​​

​​

3. Triggering App Tracking Transparency Request

​As most SDK recommend We will need to trigger this before we initialize any SDK’s that we wish to pass the IDFA into. We also can only trigger this one pre install with users being able to edit there preference within the IOS Settings menu.​​Here we are using a really simple system where we trigger the notification when a user press a button.

Breaking down

​We first state we are using the IosSupport Library. We also inclosing this with a UNITY_IOS pre-compile which means we will only compile this code if we are running on IOS

#if UNITY_IOS using Unity.Advertisement.IosSupport; #endif

Next the actual triggering, again inclosing this with the UNITY_IOS pre-compile. We first check call ATTrackingStatusBinding.GetAuthorizationTrackingStatus() which will tell if the user has already set there preference, then ATTrackingStatusBinding.RequestAuthorizationTracking() Which will trigger the popup.

#if UNITY_IOS if(ATTrackingStatusBinding.GetAuthorizationTrackingStatus() == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED) { ATTrackingStatusBinding.RequestAuthorizationTracking(); } #endif

4. Post build steps

​Like any other permission request Apple requires a description on why you are requesting these permission. For this we need to add the NSUserTrackingUsageDescription key to our PList. Instead of having to do this each time we create a build we are going to create a post build step that automatically adds it to the XCode Project

​You can see more about Unity post build steps here

using UnityEditor;
using UnityEditor.Callbacks;
#if UNITY_IOS
using UnityEditor.iOS.Xcode;
#endif
using System.IO;
 
public class PostBuildStep
{
/// <summary>
/// Description for IDFA request notification
/// [sets NSUserTrackingUsageDescription]
/// </summary>
const string TrackingDescription =
"This identifier will be used to deliver personalized ads to you. ";
 
[PostProcessBuild(0)]
public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToXcode)
{
if (buildTarget == BuildTarget.iOS)
{
AddPListValues(pathToXcode);
}
}
 
static void AddPListValues(string pathToXcode)
{
// Get Plist from Xcode project
string plistPath = pathToXcode + "/Info.plist";
 
// Read in Plist
PlistDocument plistObj = new PlistDocument();
plistObj.ReadFromString(File.ReadAllText(plistPath));
 
// set values from the root obj
PlistElementDict plistRoot = plistObj.root;
 
// Set value in plist
plistRoot.SetString("NSUserTrackingUsageDescription", TrackingDescription);
 
// save
File.WriteAllText(plistPath, plistObj.WriteToString());
}
 
}

view rawPostBuild.cs hosted with ❤ by GitHub

​Here we just read in the PlistFile from the Xcode project we just created, then add in a new string values​plistRoot.SetString(“NSUserTrackingUsageDescription”, TrackingDescription);​Which sets the our popup text.​​

4. Testing it out

​Build the App to Xcode as normal and open it up in Xcode. If you open up the Info.Plist you will see the description we just added in from the post build step

​​​​

Now we can just build and play on our device. Then just press the button and you should see the IDFA Popup!

​​​​​

​​​​

​You will notice that if you press the button again it won’t re-trigger this is by the apple requirements so we will need to uninstall and pre-install to test it again.​

​This is the basic implementation ahead of the requirement of App Tracking Transparency for IOS, for a production version it may be best to pre-warn users about the popup, explaining why you are wanting to use the IDFA. This will likely improve the number of user who opt-in​

If any problems feel free to drop me a line on Twitter @Gamereat.

 

 

[출처] alanyeats.com/post/unityapptrackingtransparencypopup/

 

App Tracking Transparency in Unity (IDFA Popup) | Alan Yeats | Pocket Sized Hands Co-Founder | VR / AR Developer

​ With Apple’s incoming changes to the requirements for use of IDFA and needing to request users permission via App Tracking Transparency popup which is incoming at some point in early 2021. Apps need to start to prepare to the incoming changes. ​ So

alanyeats.com

 

반응형
Posted by blueasa
, |

■iOSの広告識別子「IDFA=Advertising Identifier」

■Androidの広告ID「ADID=AdvertisingID」

■実機操作による確認方法
 ・Android
  「設定」->「Google」->「広告」で広告IDを確認

 ・iPhone
  わかんない

●Unity公式のサンプルスクリプト
https://docs.unity3d.com/jp/540/ScriptReference/Application.RequestAdvertisingIdentifierAsync.html

advertisingId には広告ID
enabledにはユーザーが広告IDを使用させるか?の有無が返ってくる

■自分用にソース

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GetIdfaAndAdid : MonoBehaviour {

    [SerializeField]
    public Text DisplayID;

    // ボタンが押されると呼ばれる
    public void GetID()
    {
        Debug.Log("■■■■■GetID()■■■■■");
        // IDFA
        Application.RequestAdvertisingIdentifierAsync(
                (string advertisingId, bool trackingEnabled, string error) =>
                {
                    Debug.Log("advertisingId=" + advertisingId + " enabled=" + trackingEnabled + " error=" + error);
                    DisplayID.text = "advertisingId=" + advertisingId + " enabled=" + trackingEnabled + " error=" + error;

                }
        );
    }
}

■参考URL
https://reviewlog.info/adid-android/
https://reviewlog.info/ios-idfa-reset/
https://stackoverflow.com/questions/34193282/apple-idfa-in-unity-via-plugin

Appleの規約
https://support.apple.com/ja-jp/HT205223



[출처] https://qiita.com/satotin/items/f4afb0a08adbec26a062

[참조] https://docs.unity3d.com/ScriptReference/Application.RequestAdvertisingIdentifierAsync.html

반응형
Posted by blueasa
, |