Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

The Info.plist contains a key 'UIApplicationExitsOnSuspend

Discussion in 'iOS and tvOS' started by IndieFist, Jun 3, 2019.

  1. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    415
    I have this error after updated my inapp module.
    Using unity 2018.3.13f1

    ITMS-90339: Deprecated Info.plist Key - The Info.plist contains a key 'UIApplicationExitsOnSuspend' in bundle RequiemErich [RequiemErich.app] that will soon be unsupported. Remove the key, rebuild your app and resubmit.

    I haven’t this key in my info.plist.
    Using google don’t help me in this case
     
  2. Coding2Handed

    Coding2Handed

    Joined:
    Jan 14, 2018
    Posts:
    4
    Just had this same issue. Probably some updates after wwdc announcements.
    on xcode, View plist as code, and you'll probably find it.
     
    IndieFist likes this.
  3. Budark

    Budark

    Joined:
    Jan 26, 2018
    Posts:
    1
    Same problema but seems that nothing happens. We have just upload the app and now it's not rejected we don't know why.
     
    IndieFist likes this.
  4. purpleshirt

    purpleshirt

    Joined:
    Jun 19, 2014
    Posts:
    3
    I'm trying just removing the key in Xcode and submitting to see if it affects anything. I did this by using the search spyglass under the play button in Xcode to find "UIApplicationExitsOnSuspend" and clicking the minus sign to remove the key when it popped up. Hopefully apple's suggestion that we just remove the key, rebuild, and resubmit will just work without issue. One can hope.
     
    AlexxQ, CoCoNutti, DTFun and 2 others like this.
  5. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    415
    isn´nt any key in info.plist like this
     
  6. Le-Tuan-Son

    Le-Tuan-Son

    Joined:
    Jan 13, 2016
    Posts:
    13
    The name of this key in Info.Plist editor is "Application does not run in background"
     
  7. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    415
    Yes, and i have set this in NO, because if you put YES then the game its closed when user press home button really?
     
    slake_it likes this.
  8. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    228
    This seems like a bug in how Unity generates Info.plist. Could someone report this as a bug?
    I got this message from App Store Connect:

    This key was deprecated in latest iOS beta: https://developer.apple.com/documentation/ios_ipados_release_notes/ios_ipados_13_beta_release_notes
     
    CasualT_Bossfight and IndieFist like this.
  9. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    415
    nick_LoS and jipsen like this.
  10. VictorElselamFofuuu

    VictorElselamFofuuu

    Joined:
    Jan 31, 2019
    Posts:
    1
    Same here, I had the same conclusion: some Apple update after wwdc and Unity is not prepared for this...
     
  11. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,159
    The problem is that the key no longer exists. When you set it to "NO", iOS now says "you're setting what to no?" Apple decided that nothing is allowed to quit on suspend, so got rid of the option, but Unity is still adding it to info.plist.

    To summarize: either open info.plist as text and delete <key>UIApplicationExitsOnSuspend</key><false/>, or edit it within Xcode and remove "Application does not run in background".

    I'll edit this 6+ hours from now to see if the resubmit is happy (it currently says it's uploaded with a warning).
     
  12. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    228
    The best solution I see now is to write a postprocessbuild script that opens generated Info.plist and manually removes the offending key (there's code examples for this on this forum). I don't see how manually editing anything in plist or in xcode itself is useful, for me at least. App is built via CI pipeline.
     
    CasualT_Bossfight and nfetissow like this.
  13. nastashonok

    nastashonok

    Joined:
    Aug 25, 2018
    Posts:
    5
    Code (CSharp):
    1. using UnityEditor;
    2. using UnityEditor.Callbacks;
    3. #if UNITY_IOS
    4. using System.IO;
    5. using UnityEditor.iOS.Xcode;
    6. #endif
    7.  
    8. public class BuildProcessor
    9. {
    10.    [PostProcessBuild(1)]
    11.    public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
    12.    {
    13. #if UNITY_IOS
    14.       // Get plist
    15.       string plistPath = pathToBuiltProject + "/Info.plist";
    16.       PlistDocument plist = new PlistDocument();
    17.       plist.ReadFromString(File.ReadAllText(plistPath));
    18.  
    19.       // Get root
    20.       PlistElementDict rootDict = plist.root;
    21.  
    22.       // Set encryption usage boolean
    23.       string encryptKey = "ITSAppUsesNonExemptEncryption";
    24.         rootDict.SetBoolean(encryptKey, false);
    25.  
    26.       // remove exit on suspend if it exists.
    27.       string exitsOnSuspendKey = "UIApplicationExitsOnSuspend";
    28.       if(rootDict.values.ContainsKey(exitsOnSuspendKey))
    29.       {
    30.          rootDict.values.Remove(exitsOnSuspendKey);
    31.       }
    32.  
    33.       // Write to file
    34.       File.WriteAllText(plistPath, plist.WriteToString());
    35. #endif
    36.    }
    37. }
    38.  
     
    Last edited: Jun 5, 2019
  14. crazyfan

    crazyfan

    Joined:
    Sep 2, 2014
    Posts:
    7
    same problem
     
  15. brodiebrodie

    brodiebrodie

    Joined:
    May 21, 2018
    Posts:
    5
    So where do you add this script? Can I just add it to any game object in the first scene? Or what? I've never added a post processing script before and google just shows post processing effects.
     
    DmitryZ2103 likes this.
  16. kalamtech

    kalamtech

    Joined:
    Oct 27, 2017
    Posts:
    8
    Create a new code file called "BuildProcessor.cs" in a folder called "Editor". Create the folder if it doesn't exist, it's a special keyword folder, like "Resources".

    Then put this in the new code file:

    Code (CSharp):
    1.  
    2. using UnityEditor;
    3. using UnityEditor.Callbacks;
    4. #if UNITY_IOS
    5. using System.IO;
    6. using UnityEditor.iOS.Xcode;
    7. #endif
    8.  
    9. public class BuildProcessor
    10. {
    11.    [PostProcessBuild(1)]
    12.    public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
    13.    {
    14. #if UNITY_IOS
    15.       // Get plist
    16.       string plistPath = pathToBuiltProject + "/Info.plist";
    17.       PlistDocument plist = new PlistDocument();
    18.       plist.ReadFromString(File.ReadAllText(plistPath));
    19.  
    20.       // Get root
    21.       PlistElementDict rootDict = plist.root;
    22.  
    23.       // Set encryption usage boolean
    24.       string encryptKey = "ITSAppUsesNonExemptEncryption";
    25.         rootDict.SetBoolean(encryptKey, false);
    26.  
    27.       // remove exit on suspend if it exists.
    28.       string exitsOnSuspendKey = "UIApplicationExitsOnSuspend";
    29.       if(rootDict.values.ContainsKey(exitsOnSuspendKey))
    30.       {
    31.          rootDict.values.Remove(exitsOnSuspendKey);
    32.       }
    33.  
    34.       // Write to file
    35.       File.WriteAllText(plistPath, plist.WriteToString());
    36. #endif
    37.    }
    38. }
    39.  
    There is nothing more to it than that.
     
  17. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,159
    Confirming: simply removing the key, however you do it, works - Apple is smiling and happy after an upload, with no warnings.
     
    CasualT_Bossfight, olonge and pjbaron like this.
  18. brodiebrodie

    brodiebrodie

    Joined:
    May 21, 2018
    Posts:
    5
    Thanks! I can confirm that this works.
     
    kalamtech likes this.
  19. Fronne

    Fronne

    Joined:
    Sep 25, 2014
    Posts:
    110
    Thnx!
     
  20. AsifNaeem

    AsifNaeem

    Joined:
    Apr 12, 2016
    Posts:
    3
    Facing same problem.
     
  21. waldgeist

    waldgeist

    Joined:
    May 6, 2017
    Posts:
    153
    Same message here.
     
  22. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,159
    In StackOverflow or UnityAnswers, the solution will turn green and move up so it's the first thing you see. But not here. You need to scroll through every reply. Sometimes one post will have a partial fix, while posts below will give the rest. In this case, if you read just a few replies, you'll see the "ExitOnSuspend" problem has a fix.
     
    Fronne likes this.
  23. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    201
    Unity needs to fix this ASAP, it's so annoying, you don't find out about this error until you start uploading the build, which is like 10 steps and 5 minutes into the process, it must affecting tons of users
     
    dvios likes this.
  24. dvios

    dvios

    Joined:
    Mar 8, 2019
    Posts:
    3
    Just noticed it's not a real error - it's just a warning. It still lets me submit the app to the store.
     
  25. Fronne

    Fronne

    Joined:
    Sep 25, 2014
    Posts:
    110
    Email from Apple after submitting:

    Dear Developer,

    We identified one or more issues with a recent delivery for your app, "Famory" 1.0.3 (1). Your delivery was successful, but you may wish to correct the following issues in your next delivery:

    ITMS-90339: Deprecated Info.plist Key - The Info.plist contains a key 'UIApplicationExitsOnSuspend' in bundle famory [famory.app] that will soon be unsupported. Remove the key, rebuild your app and resubmit.

    In a few weeks or months it can or will be an Error...
     
    Last edited: Jun 8, 2019
  26. roshan090

    roshan090

    Joined:
    Mar 20, 2018
    Posts:
    30
    can you please tell us where is Editor folder.
    thanks
     
  27. ceceomer

    ceceomer

    Joined:
    Sep 1, 2014
    Posts:
    21
    Push notification (one signal) couldn't work wtih this script although i activated background modes.
     
  28. ceceomer

    ceceomer

    Joined:
    Sep 1, 2014
    Posts:
    21
    Under Asset folder. if create new folder under asset folder then give it name "Editor".
     
    SpiderJones and roshan090 like this.
  29. trancanhluc

    trancanhluc

    Joined:
    Jun 11, 2015
    Posts:
    11
    Same issue, but I have been tried to submit for review. Just now I waiting for magic from apple review :j
     
  30. roshan090

    roshan090

    Joined:
    Mar 20, 2018
    Posts:
    30
    you are life saver man (Y)
     
    ceceomer and SpiderJones like this.
  31. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    447
  32. jawaadsheikh

    jawaadsheikh

    Joined:
    Nov 19, 2016
    Posts:
    10
    Has removing this key caused anyone's game to break in any way? I'm removing it and uploading but I'm worried that it will break my game in some way.
     
    slake_it likes this.
  33. Omar_Unity

    Omar_Unity

    Unity Technologies

    Joined:
    Aug 30, 2016
    Posts:
    3
    Hi everyone,

    Yes, we're on it. Actually we already came to a solution, I'll let you guys know once it's back-ported to Unity 2017.4, 2018.4, 2019.1 and available for downloading.


    There should not be any problem, unless you have a custom behavior in background.
    The default behavior for an iOS 12/11 app is to run in background if the 'UIApplicationExitsOnSuspend' key is not specified.
     
  34. Game120

    Game120

    Joined:
    Dec 17, 2018
    Posts:
    2
    After removing this the xcode show error of not found this key in info.plist
     
  35. Game120

    Game120

    Joined:
    Dec 17, 2018
    Posts:
    2
    Here are so much editors in my project in which editor please specify me thanks.
     
  36. CavElliott

    CavElliott

    Joined:
    Mar 12, 2017
    Posts:
    4
    Any folder named 'Editor' it does not matter where, as long as it is within Unity's Assets folder.
     
  37. waldgeist

    waldgeist

    Joined:
    May 6, 2017
    Posts:
    153
    Could you please elaborate a bit more on this? We use a background service to retrieve location data.
     
  38. badjano

    badjano

    Joined:
    Aug 2, 2012
    Posts:
    13
    any news? Just built with 2019.1.13 and we still have that issue
     
  39. yuriaunity

    yuriaunity

    Joined:
    Aug 9, 2019
    Posts:
    2
    Following
     
  40. better_walk_away

    better_walk_away

    Joined:
    Jul 12, 2016
    Posts:
    170
    I have just come across the same issue, though that there are some workarounds provided here, I am waiting for the official fix to this issue.
     
  41. waldgeist

    waldgeist

    Joined:
    May 6, 2017
    Posts:
    153
    It's really strange Unity is setting a flag in info.plist that is actually set to "NO". This does not make any sense to me, as "NO" was the default for this setting.
     
  42. Lostwanderer1

    Lostwanderer1

    Joined:
    Mar 11, 2019
    Posts:
    27
    Just remove application run in background from info.plist.
    That did it for me.
     
    efge likes this.
  43. Pincape

    Pincape

    Joined:
    Dec 4, 2018
    Posts:
    5
    The issue is marked to be fixed in 2018.4, but still listed in known issues for the latest 2018.4 update: https://unity3d.com/unity/whats-new/2018.4.9. What's up with that? Does it mean that it will be in the next 2018.4 release?
     
  44. dave_oak

    dave_oak

    Joined:
    Oct 7, 2015
    Posts:
    16
    It is fixed in 2018.4.10.
     
  45. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    1,471
    erm how is this not backported to 2017 LTS yet?! It's even mentioned in known issues
     
  46. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    192
    So, as the key deprecated in iOS 13, and we remove it from the info.plist file, then what happens to the app while running on older iOS versions? it's working in my case but I want to know what you guys found out. Please let me know.
     
  47. pedraos

    pedraos

    Joined:
    Aug 23, 2018
    Posts:
    1
    Hello!!,
    Unity: 2019.1.14.f1
    Xcode: 11.2.1 (11B53)
    First I could not upload the archieve, need to download from developer,, (last version not in Apple Store)
    Wait,, install,, and ok,,, let's go again...

    Appear now this error of "Uploading", ok, then go to search,,, find the "UIApplicationExitsOnSuspend"

    file: info.plist .
    UIApplicationExitsOnSuspend
    There is a minus (delete-remove it)
    Search again for "UIApplicationExitsOnSuspend"

    And well... nothing like the green check with the message "Sucessfully uploaded"
     

    Attached Files:

    FUBAR2077 likes this.
  48. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    100
    I have just built with 2019.1.14 and Im getting that warning as well. Shouldn't it be fixed on 2019.1?
     
    FUBAR2077 and Bumblebee77 like this.
  49. RGAMESR

    RGAMESR

    Joined:
    Feb 10, 2017
    Posts:
    22
    Same message
     
  50. RGAMESR

    RGAMESR

    Joined:
    Feb 10, 2017
    Posts:
    22
    I used Unity 2018.3.13.f1
     
unityunity