Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity still cannot set/save Background-Mode selections ?

Discussion in 'iOS and tvOS' started by RestlessSwords, May 12, 2022.

  1. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    I know how to edit the XCode project generated by Unity, and in the signing-certificates ADD background modes and CHECK the capabilities that I need. Re-Build the XCode project then works and the app runs.
    - but EVERY TIME in my change-build-test cycle I rebuild Unity it overwrites the XCode project changes.

    I have seen the thread containing command lines to re-do the changes, but that needs to be done every time.
    - it is a real nuisance and easy to forget when change-build-test many times a day.

    Is there still no way in Unity to set those modes and have Unity generate the appropriate XCode?
     
  2. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    PARTLY SOLVED. In build settings, player settings, for iOS
    - *ENABLE* "Custom Background Behaviors"
    - then you see the subitems and can check "Background Fetch"
    - but for some reason there is no "Background Processing"
     
  3. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    DOES "BACKGROUND PROCESSING" ACTUALLY WORK ?

    I found instructions to use the plist GUI to
    1) in settings-certificates-capabilities tab to enable (checked)
    both the background refresh box and the background processing box.
    2) in info tab to edit add in the new setting BGTaskSchedulerPermittedIdentifiers
    3) in that permitted identifies element added a sub-element com.abc.xyz
    (where the company is abc and the application is called xyz)

    But when I swipe the running application into background it seems to not be running
    - it shows up when I display all active applications
    - but it stops processing until I tap the home screen icon and then it immediately activates and continue processing.
    How do I build an application that actually RUNS when backgrounded ?