[SWIFT] Needed for iOS 14? How to set NSUserTrackingUsageDescription

What is NSUserTrackingUsageDescription?

When I built the app for the first time on a device that became iOS14, it crashed. .. .. The Xcode log is below: point_down:

This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSUserTrackingUsageDescription key with a string value explaining to the user how the app uses this data.

Apparently you need NSUserTrackingUsageDescription? It seems.

For now, read the Official Documentation.

** The point seems to be the List Key described in ʻinfo.plist` **

And what is the purpose?

IDFA (Identifier for Advertisers) is a device ID that Apple randomly assigns to a user's device. Advertisers can use this ID to measure user ad engagement and in-app user behavior to serve customized ads. https://www.adjust.com/ja/glossary/idfa/

So, ** "Do advertisers use the ID assigned to your device for proper ad delivery?" ** Does that mean? ??

Add value to ʻinfo.plist`

Refer to here and put characters in the Value part for the time being. Try.

スクリーンショット 2020-10-06 22.12.58.jpg

Now I set the key and value

スクリーンショット 2020-10-06 22.10.27.jpg

Oh! Is this the example IDFA opt-in dialog! Since the simulator is set to English, the opt-in dialog is also in English, but it seems that there is no problem for the time being.

Reference: Try to open the IDFA opt-in dialog on iOS14

Make the opt-in dialog Japanese

With reference to here, I made a Japanese sentence like that, and when I built it on the actual machine, the opt-in dialog was properly in Japanese.

Finally

It seems that people who are advertising on the app will have to deal with it eventually, so as soon as possible ~

Postscript

Add SKAdNetworkItems

Here we make Google available to SKAd Network. Even if the user refuses to obtain IDFA, it is used to deliver advertisements using the SKAd Network provided by Apple. https://d1v1b.com/posts/update_admob_for_ios_app

skadnetwork.png

ʻIt seems better to add SKAdNetworkItems to Info.plist`, so put it in

Recommended Posts

Needed for iOS 14? How to set NSUserTrackingUsageDescription
[Java] (for MacOS) How to set the classpath
How to set Dependency Injection (DI) for Spring Boot
How to set Docker nginx
How to set Java constants
[iOS] How to read Carthage
How to specify validation for time_field
How to install JMeter for Mac
How to set Spring Boot + PostgreSQL
How to set Lombok in Eclipse
How to adjustTextPosition with iOS Keyboard Extension
How to use binding.pry for view files
How to install Play Framework 2.6 for Mac
Easy way to set iOS app icon
[IOS] How to get data from DynamoDB
How to create a Maven repository for 2020
How to set up and use kapt
[Java] How to set the Date time to 00:00:00
[Ruby] How to use slice for beginners
Introduction to kotlin for iOS developers ⑥-Kotlin creation
How to set JAVA_HOME with Maven appassembler-maven-plugin
Introduction to kotlin for iOS developers ④-Type
[For beginners] How to debug in Eclipse
How to set different source / target versions for production code and test code
[Java] How to test for null with JUnit
How to create a database for H2 Database anywhere
How to find OSS trends for web development
How to create pagination for a "kaminari" array
[Rails] How to implement unit tests for models
How to deploy
[For beginners] How to implement the delete function
Introduction to kotlin for iOS developers ⑤-Practical XML
How to make a lightweight JRE for distribution
How to set up JavaED Full Edition (pleiades)
Introduction to kotlin for iOS developers ③-About gradle
[Rails] How to use Gem'rails-i18n' for Japanese support
How to use nginx-ingress-controller with Docker for Mac
How to set up computer vision for tracking images and videos with TrackingJs
Introduction to kotlin for iOS developers ①-Environment construction
[For super beginners] How to use autofocus: true
Introduction to kotlin for iOS developers ②-Project creation
How to specify index of JavaScript for statement
Spring Boot --How to set session timeout time
[Java] How to make multiple for loops single
How to implement Pagination in GraphQL (for ruby)
How to implement login request processing (Rails / for beginners)
How to set the display time to Japan time in Rails
[Rails] How to create a signed URL for CloudFront
How to build Docker + Springboot app (for basic learning)
How to use an array for a TreeMap key
How to write a unit test for Spring Boot 2
How to build docker environment with Gradle for intelliJ
Rails / Ruby: How to get HTML text for Mail
How to deal with No template for interactive request
[For beginners] How to operate Stream API after Java 8
[Spring Boot] How to create a project (for beginners)
How to use Truth (assertion library for Java / Android)
How to set BuildConfig of library project (module) to Debug
[For those who create portfolios] How to use font-awesome-rails
How to make Laravel faster with Docker for Mac
[Rails 6] How to set a background image in Rails [CSS]