Recently, we have received a number of reports indicating that Apple have tightened their review process, and have started rejecting apps that use iOS Advertising Identifier but do not show advertisements. This blog post will help you determine whether your app might be affected, and provide advice on how to overcome any issues you might face.
static id QueryASIdentifierManager() { //... } static void QueryAdID() { //... } static void QueryAdTracking() { //... }
c) Remove the following declarations of variables:
static NSString* _ADID = nil; static bool _AdTrackingEnabled = false;
d) Modify implementations of the following the functions (replace with those provided below):
extern "C" const char* UnityAdvertisingIdentifier() { return NULL; } extern "C" bool UnityAdvertisingTrackingEnabled() { return false; } static void QueryDeviceID() { if(_DeviceID == nil) { #if UNITY_PRE_IOS7_TARGET if(!_ios70orNewer) _InitDeviceIDPreIOS7(); #endif // first check vendor id if(_DeviceID == nil) { QueryVendorID(); _DeviceID = _VendorID; } } }
These modifications only affect the current build of your Xcode project. If you rebuild an Xcode project from Unity and choose to replace it or build it to a new location, you need to reapply these changes. If you do not intend to show any advertisements anywhere in your project, consider updating the master template of this file located at: /Applications/Unity/Unity.app/Contents/PlaybackEngines/iPhonePlayer/iPhone-Trampoline/Classes/Unity
Is this article helpful for you?
Thank you for your feedback!