Giter Club home page Giter Club logo

com.unity.ads.ios-support's Introduction

Using this package

This package supports Apple's SKAdNetwork and AppTrackingTransparency frameworks for your made-with-Unity iOS application, by aggregating proper ad network IDs and providing access to relevant Apple developer APIs.

For more information about iOS 14 technical integration, including this package's support functionality, please see the full iOS 14 technical documentation.

Installing the package

From this repository

  1. Download this repo to your hard drive.
  2. In the Unity Editor, open the Unity Package Manager window.
  3. Click the + button and select Add package from disk....
  4. Navigate to the location where you downloaded the repo and select the iOS14 Support package (..\com.unity.ads.ios-support-master\com.unity.ads.ios-support\package.json) to install the package. If successful, the iOS14 Support package will appear in the package manager list (note that you must have All packages selected to view it).

From Unity Package Manager

  1. In the Unity Editor, select Window > Package Manager to open the Package Manager.
  2. Select the iOS 14 Advertising Support package from the list, then select the most recent verified version.
  3. Click the Install or Update button.

Apple developer API extensions

This package provides access to the following Apple developer APIs:

public static void SkAdNetworkUpdateConversionValue(int conversionValue)

This method allows you to update the attribution conversion value.

SkAdNetworkRegisterAppForNetworkAttribution()

This method allows you to register for attribution.

public static void RequestAuthorizationTracking()

This method allows you to request the user permission dialogue.

public static AuthorizationTrackingStatus GetAuthorizationTrackingStatus()

This method allows you to check the app tracking transparency (ATT) authorization status.

Sample Project

The SampleProject~ folder included here is a complete Unity project, compatible with Unity 2018.4.33f1 and up. This project contains an example of a context screen you could use to give context to users before showing the native App Tracking Transparency dialog.

com.unity.ads.ios-support's People

Contributors

declanmcpartlin avatar repodb[bot] avatar unitysteven avatar vita-unity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

com.unity.ads.ios-support's Issues

A better way to install the package

The instructions on how to install the package were misleading. Installing it via the GUI package manager does not work. Installing it by downloading it to your computer does not work, as then that creates a reference to the package that works only for you and not for other members of the development.
The best way is to just add an entry in Packages/manifest.json under dependencies
"com.unity.ads.ios-support" : "https://github.com/Unity-Technologies/com.unity.ads.ios-support.git?path=/com.unity.ads.ios-support",

Hi sorry for this post I just want to have some light regarding to iOS ATT

Hi,

Im new to this and have 0 idea how this works, what I know is this plugin will have a popup on iOS devices asking

You want to be track or not.

But my question is Im using admob and unity ads or photon plugins
How can that plugins detect wether or not the user agree to track you or not
For example: Google ads will not show not relevant ads if you click do not track

Is is automatic?
How does it work

[Documentation Error] - Provide instructions for not showing the Unity popup in iOS version <14.X

On iOS 14.X devices, the native prompt is showing up after clicking on the 'next' button in the imported sample scene provided by the package manager. However, when testing the exact same sample scene on an iOS version that is lower than 14, the Unity prompt to allow ad tracking is showing up every time since this iOS version does not support app tracking.

This can handled more gracefully by checking the iOS version in the plugin by adding a method:

bool isAdTrackingSupported = ATTrackingStatusBinding.GetIfTrackingSupported();

or by returning another enum value

if(status == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_SUPPORTED) { // TODO don't show the Unity popup }

Right now I'm working around this issue by checking the iOS version with

float systemVersion = float.Parse(UnityEngine.iOS.Device.systemVersion);

I can imagine that many developers don't know that this plugin behaves like this on iOS versions lower than 14.X

Tested on:
iPhone 6
iOS 12.4.8
Built with Unity 2019.4.17f1 on xCode 12.4
iOS 14 Advertising Support 1.0.0 package installed via package manager

Custom completion handler

id handler = ^(NSUInteger result) {
NSLog(@"Result request tracking authorization : %lu", (unsigned long)result);
};
SEL requestSelector = NSSelectorFromString(@"requestTrackingAuthorizationWithCompletionHandler:");
if ([self.trackingManagerAuthorizationClass respondsToSelector:requestSelector]) {
[self.trackingManagerAuthorizationClass performSelector:requestSelector withObject:handler];
}

From this code, I assume there is currently no way to pass a custom completion handler when requesting authorization. I don't have enough experience with Objective-C to write a PR myself but it would be greatly appreciated if somebody added this feature. Thanks! :)

Package should check iOS version support

Calling the request currently doesn't give any indication if the OS supports the App Tracking Transparency at all.

This is in most cases not a problem as it would get called and move along, but a reasonable implementation approach would be to request tracking and then wait in a coroutine until a response is gotten in order to track opt-in rates etc.

On devices without support this would cause hanging behavior if no timeout is provided or have those on an unsupported version having to wait for a timeout.

All of this is possible to work around of course, but as the documentation for the package doesn't mention anything it would be expected to be handled under the hood.

Sample ContextScreenManager missing namespace error

Using the provided Samples in the 1.2.0 version of the package can cause a missing namespace error when attempting to build the project.

Assets\Samples\iOS 14 Advertising Support\1.2.0\01 Context Screen\Scripts\ContextScreenManager.cs(4,19): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

This seems to be caused by the import using UnityEngine.iOS; not being wrapped in a #if UNITY_IOS directive.

Adding the iOS module to the Unity install resolves this, but this isn't possible or desirable in some situations.

I am getting this error for kids category and the game is not publishing in appstore

I don't use Unity ads, I just use admob ads, how can I solve this problem?

Guideline 1.3 - Safety - Kids Category

We noticed that your Kids Category app includes analytics, advertising and collects, transmits, or has the ability to share personal information or device information with third parties. Specifically:

  • Your app includes third-party analytics or third-party advertising with the ability to collect, transmit or share identifiable information, including, for example, IDFA. We found that your app references the ASIdentifierManager API, which provides access to a user's IDFA, in the following location(s) in your binary:

• /System/Library/Frameworks/AdSupport.framework/AdSupport
• KidsGAMES
• Frameworks/UnityFramework.framework/UnityFramework

It would be appropriate to remove all instances of “ASIdentifierManager” from your app, even if they are not utilized in your app's functionality.

[Documentation Error] - Add NSUsageTrackingDescription

Just tried the plugin today. The import via the package manager went well and the sample scene is nice to get started. However, there is one huge issue with documentation:

Nowhere is mentioned that you have to add NSUsageTrackingDescription to your info.plist.

Without it, the native prompt doesnt event show in the demo scene. Please add this ASAP to your docs as this is a time waster for sure! Or at least provide a post-build script with a generic description to inject this automatically in your info.plist

Tested on:
iPad pro iOS 4th Gen
iOS 15.1
Built with Unity 2019.4.14f1
iOS 14 Advertising Support plugin 1.0.0

[Feature Request] Automatically add NSUserTrackingUsageDescription key into info.plist

Feature Request:
Automatically add NSUserTrackingUsageDescription key into info.plist file when building the app.

Reasons:

  1. To make it easier when building a new Xcode project from Unity from fresh instead of going through same post-build steps for new build
  2. Some Unity developers don't have knowledge on how Xcode works. Adding this feature could reduce the learning curve.

[Documentation Error] iOS Support not included in Advertising 3.5.2

Hi all,

In the "From Unity Package Manager" section of the README, this package claims that it's been integrated into Unity Advertising; however for folks on Unity 2019.4, our latest verified version of Advertising (3.5.2) does not appear to include the iOS support package. I've had to import it as an embedded package in my current project, and thought I would flag this for other 2019.4 users.

Wrong method name with updateConversionValue selector

In SkAdNetworkManager updateConversionValue method the selector name updateConversonValue: is wrong. It should be updateConversionValue: instead.

Noticed this as all callbacks we received had conversion value of 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.