Search Unity

iOS Advertising Identifier rejection FAQ

Discussion in 'iOS and tvOS' started by Mantas-Puida, Feb 3, 2014.

  1. tinmanassets

    tinmanassets

    Joined:
    Jan 6, 2009
    Posts:
    61
    We just got rejected for this using 4.5.2 and no third party plugins
     
  2. tinmanassets

    tinmanassets

    Joined:
    Jan 6, 2009
    Posts:
    61
    Wait, we did have a 3rd party plugin, a big one: FacebookSDK. (dont know how I missed that! :) In any case, the FBSDK seems to link in the adSupport framework. I had to change their code to make it so that I could build without it. Hopefully this allows our app to get accepted!
     
  3. kscho

    kscho

    Joined:
    Jun 17, 2014
    Posts:
    59
    My first Unity game was rejected by Apple due to the IDFA issue.

    I've run the game on my iPad via Unity->Xcode. The test ad shows up successfully (see attached).

    However, the Apple's review team said that my game didn't serve ad even though I use an IDFA. I'm baffled.

    I'm using the Unity's ADBannerView to serve the iAd. Xcode reports some depreciation of some ADBannerContentSizeIdentifier, but I feel that it's not related to this issue.

    For the Google Play version, I'm using Admob, so I've the Admob plugin (from GITHUB) in the project. Can this be a possible cause?

    If you've tackled this issue before, I appreciate your pointers.

     
  4. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    I am getting the following results after getting grep command.. will it do good if I follow the steps you gave>
     

    Attached Files:

  5. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Serving Apple Ads via iAd do not justify IDFA use. You should be serving 3rd party Ads to get approved with IDFA use.
     
  6. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    can't we just correct it from unity project itself. I mean to say how to remove it from unity project and not from device settings.mm
     
  7. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    If you are using latest Unity 4.5.x you don't need to modify any files to get approved (assuming you don't use IDFA from your scripts and don't use 3rd party plugins, which do that).
     
  8. kscho

    kscho

    Joined:
    Jun 17, 2014
    Posts:
    59
    hi mantas, maybe my issue isn't related to IDFA then. Let me quote the reason in full:

    "We found your app uses the iOS Advertising Identifier but does not include ad functionality."

    However, the issue being, I can see the test iAd ad on my iPad, but the review team cannot see it on the build they review. I don't use any third party plugin. I only use the ADBannerView functionality that Unity provides.

    That means, between the testing on my iPad and the actual submission, I've missed something? Should I manually bundle an iAd-related library? What did I miss that caused the ad to disappear in the submitted build?

    This is the code:



    using UnityEngine;
    using System.Collections;

    public class iAdManager : MonoBehaviour {

    #if UNITY_IPHONE
    private ADBannerView banner = null;

    void Awake ()
    {
    DontDestroyOnLoad (gameObject);
    }

    void Start () {
    banner = new ADBannerView (ADBannerView.Type.Banner,
    ADBannerView.Layout.BottomCenter);

    // subscribe functions to Banner events
    ADBannerView.onBannerWasClicked += OnBannerClicked;
    ADBannerView.onBannerWasLoaded += OnBannerLoaded;
    }

    void OnBannerClicked()
    {
    Debug.Log("Clicked!\n");
    }

    void OnBannerLoaded()
    {
    Debug.Log("Loaded!\n");
    banner.visible = true;
    }
    #endif
    }
     
  9. kscho

    kscho

    Joined:
    Jun 17, 2014
    Posts:
    59
    Adding the xcode screen incase it's related



    Also adding the apple rejection message

     
  10. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    One more thing is we are having a problem in unity engine.dll as well.. the advertising identifier is existing in that file. how to solve this problem.
     
  11. kscho

    kscho

    Joined:
    Jun 17, 2014
    Posts:
    59
    In my 3rd submission, I've said 'No' to the question 'Does this app use IDFA' posed during the app submission stage.

    Even though Mantas says that we don't need to modify the DeviceSettings.mm anymore after Unity 4.5.x, when I do a grep -r on the xcode project folder generated by Unity, I STILL see the following. Is this the reason why my app is rejected?



    devean, I also see issue with engine.dll...
     
    Last edited: Aug 20, 2014
  12. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Was your 3rd submission (when you said you are not using IDFA) successful?

    P.S. IDFA exists in Unity 4.5.2 implementation, but it's purely dynamic. It means engine is not calling it if your scripts aren't doing this via http://docs.unity3d.com/ScriptReference/iPhone-advertisingIdentifier.html. Apple is checking if you are actually calling this or have static AdSupport reference in your Xcode projects. Sometimes people accidentally add it to their project.

    P.P.S. Also please make sure you are not submitting older project archive, there have been cases when people were submitting not the latest build.
     
  13. kscho

    kscho

    Joined:
    Jun 17, 2014
    Posts:
    59
    thanks mantas for your reply.

    (1) I just made my third submission today (now waiting for review). unfortunately, I'll only know the outcome 7 days later. Such is the painful and unfortunate fact of apple review ... but meanwhile I want to know about cause as much as possible.

    (2) My game only uses Adbannerview to create the iAd banner and nothing else. I didn't make any explicit call to Advertisingidentifier. All I wanted to do, is to show iAd, nothing more.

    (3) I'm sure I wasn't submitting an old project archive because I noted the date and time stamp.

    (4) Based on my screen grab above (i.e. the outputs of three grep commands), should I be concerned? Some keywords have been found in DeviceSettings.mm, RegisterMonoModules.cpp and Unity_Engine.dll. Have I done something wrong to cause that?
     
  14. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Short note:
    Some plugins are including direct references of files to Xcode project, without copying them to project subfolder, so grep isn't most accurate tool to check for IDFA usage. Bit more reliable ways is doing "nm finalappbinary | grep advertisingIdentifier" also "otool -L finalappbinary | grep AdSupport".

    Otherwise you should be fine.
     
    kscho likes this.
  15. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    Does anyone know why I get this error while testing my game?
    ADBannerView error: The operation couldn’t be completed. Ad was unloaded from this banner

    The ads do not display at all, and the way I did it was using the code in the documentation, and putting it on an empty game object in the scene that I want the ad to be displayed.
     
  16. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
  17. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    This is an unrelated question to my previous one, but does Prime31's IAd plugin take care of all of this? Meaning do I still have to edit the device settings if I have Prime31's iAd Plugin?
     
  18. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    I applied these steps but was rejected.


    I use Chartboost. I am wondering if some other settings, perhaps in iTunes Connect for my binary, are incorrect.


    ?? Helllp.
     
  19. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    I'm trying to use iAd, so I can't help you there with ChartBoost. Sorry.
     
  20. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Ok.
    I actually have someone from Apple calling me today. This was my 7th rejection. Each time, I thought I had resolved it. Anyhow, ok.
     
  21. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    @Mantas Puida - Will implementing the fix on page 1 of this thread have any negative effects in 4.5.3 (as 'extra protection'), or should I leave it as is?
     
  22. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    If you don't rely on SystemInfo.deviceUniqueIdentifier then you are fine.
     
  23. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
  24. ErwanB

    ErwanB

    Joined:
    Nov 14, 2012
    Posts:
    25
    My App just got rejected after 11 days thanks to Unity quietly loading AdSupport.framework in DeviceSettings.mm.
    One word : Thanks

    Edit : btw I'm using iAd in my App but it still got rejected. Using Unity 4.5.3p1 and of course no static ref to AdSupport.framework
     
    Last edited: Sep 4, 2014
  25. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Hi,
    at the moment we have no confirmed cases that Unity 4.5.x out of the box would cause submission problems. Usually it turns out something extra was involved into case when submission wasn't successful.
    I would like to help figuring what's going wrong. There are couple of things to clarify:
    - are you using 3rd party plugins?
    - what did you specify about IDFA usage when doing app submission?

    P.S. I just quickly made empty Unity app with Unity 4.5.3f1 to make sure it is NOT loading AdSupport when not really requested from scripts. Result came negative, mean it is not touching it.
    P.P.S. You can also make such test by placing "NSLog(@"Very BAD!!!!!!");" inside QueryASIdentifierManager() implementation in DeviceSettings.mm and then inspecting Xcode debug console for this message.
     
  26. Catacomber

    Catacomber

    Joined:
    Sep 22, 2009
    Posts:
    682
    I just did a new update and to be safe used your old code and no problem at all.

    So if anyone is nervous they should be ok just substituting your old code I think.

    But I also put a disclaimer in the notes for the reviewers that I don't call the "Very BAD thing". I think that's a good thing to do. : )
     
  27. ErwanB

    ErwanB

    Joined:
    Nov 14, 2012
    Posts:
    25

    Apologies, I might have screwed up on my side.
    I check "Yes" on IDFA usage for my App (since it does serve ads).
    The trick is that nor the form neither the developer guide specify that you should check "No" if you're only using iAds to serve Ads.
    However, the rejection message clearly states that using iAd does not justify the use of IDFA. This kind of information we'd like to know earlier...

    Anyway I resubmitted a new binary (removing unnecessary code from DeviceSettings.mm just to be sure) and making sure that IDFA usage is set to "No".
    And now my wait begins (again).

    So apologies to Unity devs, I now focus my wrath on Apple :D
     
  28. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    Just got rejected today as well. Sucks too because I followed the steps on the first page, and had to wait 10 days for waiting for review to change to in review, and now I'm rejected.:( Though I think I might have found the problem. Here's a picture of my project with the advertisingIdentifier: http://imgur.com/e2PC9TF



    Could these be the problem? If so what can I do to fix it?
     
  29. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    @Dogg you must run the command with the project grep -r advertisingidentifier .
    in the terminal within the directory. that would display all the places where it is used. Then you can remove them one by one. Generally we can leave the ones in unity engine.dll as it is generated by unity.
    Others we can remove the ADid and all files related to third party sdk's like chart boost, play haven etc.
    Page 1 fix is for default device settings.mm only. we also have to remove the advertising identifier from different files as well.
     
  30. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    Do I need them to display ads? Or can I keep them?
     
  31. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    The problem is for the paid versions . As the issue is :
    "Recently we received several reports that Apple started rejecting apps that use iOS Advertising Identifier, but do not show advertisements. If you was affected by this issue there are instructions how to remove use of this API from Xcode project produced by Unity."

    not for free versions where we need to display the ads. So for paid version you have to remove the ad id from your project. and this grep command will help you to identify the number of files where you have this advertising identifier. You have to use this on both your unity project and then on build prepared.
    It surely will help .@dogg
     
    Last edited: Sep 6, 2014
  32. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    I see then okay thanks. But It's sorta hard to understand what you mean by "grep -r advertisingidentifier" and in the terminal within the directory. I'm sorry I just don't know everything about Xcode yet. I thought it was just to build your app.
     
  33. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    Actually, the problem according to the Apple review team is that they can't see the ads. Which is weird considering how before I built the game in Xcode I tested it one last time to make sure everything was working(which it was). It couldn't have been because of me uploading the wrong binary, because there was only one binary made. I also ran some test again and it worked perfectly fine. They've asked for some screenshots on Friday so I've sent them some. Sadly I have to wait another day until they finally see the screenshots(they don't work on the weekends so I've heard). I'll reply back to let you guys know what happens.
     
  34. Dogg

    Dogg

    Joined:
    Mar 5, 2014
    Posts:
    203
    Well Apple is very helpful now are they? So as you guys know if you read my last post that my ads are on my game, but according to Apple there are not. So they asked me these two questions: "1.) Are the advertisements within the application only iAD? 2.) If not, can you please provide screenshots that are not iAD? iAD do not fall under the current rejection."

    Well I answered yes to 1. and I said there is only iAD for 2. Now they sent me the same message as last time. "Thank you for your response. However, we found your app uses the iOS Advertising Identifier but does not include ad functionality." What??? Anyways I'm going to rebuild my game and put the ads in a place that's more noticeable, since Apple can't even seem to find my ads for whatever reason. Now I have to redo everything all over again...:mad:
     
  35. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    oh.
    Yes they don't seem to be much helpful many times :)
     
    Dogg likes this.
  36. kilik85

    kilik85

    Joined:
    Oct 7, 2013
    Posts:
    9
    Hi there. Our game is being rejected and I've just found this link http://blogs.unity3d.com/2014/02/11/overcoming-issues-with-ios-app-store-submissions/
    We don't serve ads and we're using Game Analytics but with the iAd feature disabled and the VendorID file moved to another folder according to their fix. That's how we avoided the Advertising Identifier warning on validation, but our app still was rejected for the same reason.

    Should we follow option 3 in that link if we're using Unity 4.5.3 or was it fixed?
     
  37. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    You don't need to follow option 3 for Unity 4.5.3.
    Most likely your 3rd party plugin is causing troubles.
     
  38. kilik85

    kilik85

    Joined:
    Oct 7, 2013
    Posts:
    9
    Thanks. Is there any way for us to check what the problem could be? I assume it's not because of Game Analytics anymore, but I don't know who can I check what other plugin could be causing the problem...

    Thanks again
     
  39. Varaughe

    Varaughe

    Joined:
    Apr 22, 2013
    Posts:
    40
    Mantas Puida said that ,if you're using ONLY iAd ,you are not allowed to use Advertising Identifier(because there's no need)...However I think yourself found that already ...
     
  40. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    @kilik85, you could start by looking if your app is statically linking AdSupport.framework. If that's the case, you should remove link to that framework and see if app still builds. In case when plugin is statically using IDFA you will see missing symbols. Though there might be case when plugin is loading this framework dynamically, it would be much harder to detect. You probably could stop app in middle of running and check in debugger, which frameworks are loaded.
     
  41. devean

    devean

    Joined:
    May 20, 2014
    Posts:
    14
    @Mantas Puida I would like to share a problem with you. When I am creating the Xcode project from the Unity , it is running in my system. But when I share it with someone else it is giving errors. First it gave problem related to Facebooksdk bundle resource , then some other. I don't know whats the matter. Please suggest something
    Thanks
    I am sharing the screenshot of the error occurring at other person's pc which is not shown at my end..
    And even when I change the location of project in my system it is creating the problem what can be matter.
    Screen Shot 2014-09-16 at 3.11.40 pm.png Screen Shot 2014-09-13 at 11.54.12 PM.1.png
     
  42. ErwanB

    ErwanB

    Joined:
    Nov 14, 2012
    Posts:
    25
    Quick Follow-up on my situation: my App got approved by Apple.

    What I did :
    - Removed IDFA code from the Xcode project following the steps on first page
    - Answered "No" to the question on IDFA usage on the submit form.

    Hope that helps ;)
     
  43. yattamove

    yattamove

    Joined:
    Sep 22, 2014
    Posts:
    1
    @Erwan Bézier
    You do have third party ads right? Like Chartboost?
     
  44. ErwanB

    ErwanB

    Joined:
    Nov 14, 2012
    Posts:
    25
    nope, only iAD
     
  45. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I am getting some serious worry going on up in my head right now...

    I need a way to generate a unique username per device for people using my product. Since I need to be able to regenerate the same username each time for the same device but still be 100% sure the usernames don't conflict with other users I was thinking the Systeminfo.deviceUniqueIdentifier would be the perfect candidate to use as the username seeing as how it references identifierForVendor, which seems to be what Apple wants us to use...

    Are you saying that if I do not serve any ads of any kind but I use deviceUniqueIdentifier for my usernames then my app will be rejected??? If so, does anyone here have any ideas on how to generate unique usernames that can be reproduced on the device? Generating a random UUID value based off time, for instance is great for uniqueness but useless for reproducing the value for the second logon... Any ideas at all?
     
    Last edited: Oct 2, 2014
  46. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I really wanted something like MrDude is asking for as well...
     
  47. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    This got bit out of context. My original post was for people who are using latest Unity 4.5.x versions AND for applying patch posted on the beginning of this thread (which is not necessary, but makes people feel safer). Applying this patch will mess SystemInfo.deviceUniqueIdentifier impl up.

    So if you are on latest Unity 4.5.x AND NOT applying patch, you should be fine using SystemInfo.deviceUniqueIdentifier.
     
  48. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Thanks Manta. I must admit I still don't get why you say what you do, but if you are saying that is in deed the case then thank you very much :)

    See, The subject of this thread is "OS Advertising Identifier rejection FAQ" and in the OP you mention that Apple is rejecting apps for using the advertising Identifier without showing ads. As it is, I wanted to do exactly this, use the deviceUniqueIdentifier field but not show ads. According to the docs, the deviceUniqueIdentifier returns the advertising ID so according to me, I was screwed...

    Even if I wanted to apply the patch, I later discovered that I couldn't because we include the TapJoy SDK and that makes use of the ads framework. I figured I was lost so I decided to take the easy way out... I now show ads on my main menu... :D Simply show ads and Apple should be okay :)

    ...which is why your reply above just confused the daylights out of me again. You are saying I can use the deviceUniqueIdentifier now, without applying any patches, just using it as is and now I don;t have to include ads in order to use it ? Huh?

    Again, I have no idea how that works but if you are saying that all is fine with the world now and I can use it without getting rejected, then thanks for that :D
     
  49. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    64
    Cool game idea dude.
    I downloaded and played it.
    The game looks very good visually, looks very professional. My only complain is the floating balloon. I was expecting them to be like coins, i didn't think they'll cause me to crash.
     
  50. manny003

    manny003

    Joined:
    Mar 18, 2014
    Posts:
    69
    I'm desperate. Two submissions and two rejections.

    Both were built with Unity 4.5.x Free Edition. I've read every post in this thread and am at a lost as to what to do next. Although it has been stated that if I'm using Unity 4.5.x that I don't have to apply the patch -- but I did it anyways since I don't know what else to do.

    I am only showing iAd banners. I did used to also show ADInterstitialAd but I was getting crashes to I just wrapped them inside some unreachable code for now.

    The only plugin I'm using is iTween and NGUI and I've performed the grep command "grep -r advertisingIdentifier ." as noted several times in this thread and the only occurrences I saw were already addressed by the patch (i.e. commented out code).

    My deployment target is 5.1 -- does that make any difference?

    Did I miss anything?

    Thanks,
    Manny
     
    Last edited: Oct 8, 2014