Search Unity

OnApplicationPause called twice in iOS devices

Discussion in 'iOS and tvOS' started by Shankar-Ganesh, Feb 16, 2021.

  1. Shankar-Ganesh

    Shankar-Ganesh

    Joined:
    Sep 23, 2013
    Posts:
    32
    Hello,

    I am using Unity LTS Version 2019.4.16f1 and the issue was OnApplicationPause is called twice in iOS devices. I have checked in my iPAD 7th Gen and iPhone 11 Pro. Kindly let me know how to overcome this.
     
  2. robertas-unity

    robertas-unity

    QA Minion Unity Technologies

    Joined:
    Mar 24, 2015
    Posts:
    29
    Hi! I wasn't able to reproduce this issue with a simple script. Could you report a bug with a repro project attached so we could investigate this further?

    You can post the bug ID here once you do that for us to get to this quicker.
     
  3. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    void OnApplicationPause(bool pauseStatus)
    {
    if(isPaused)
    {
    // This part is calling twice
    }
    else
    {
    // This part is calling once
    }
    }
    Step to reproduce
    1. When you drag the notification screen in iPhone you will find the issue.
    2. It will not occur if you switch to different app or drag settings from right. It occurs with by step1.
    Version - Unity 2021.2.7f1
    Platform - IOS
     
  4. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    any body facing the same.