xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.64k stars 1.88k forks source link

[Bug] Inconsistent Behavior of OnAppearing and OnDisappearing Methods on iOS When Minimizing App #15807

Closed Juvelio closed 10 months ago

Juvelio commented 10 months ago

Description

Inconsistent Behavior of OnAppearing and OnDisappearing Methods on iOS When Minimizing App

Steps to Reproduce

  1. Open the application on an iOS device.
  2. Navigate to the page with the implemented OnAppearing() and OnDisappearing() methods.
  3. Observe the correct execution of these methods when navigating between pages.
  4. Minimize the application (tap the home button or use the swipe gesture to go to the home screen).
  5. Maximize the application from the home screen.

Additional Details:

The issue appears to be specific to the iOS platform. The OnAppearing() and OnDisappearing() methods behave correctly during page navigation. It seems that the application lifecycle events might not be triggered appropriately upon minimizing and restoring the app.

Issue Description:

Code Snippet:

protected override void OnAppearing() { base.OnAppearing(); }

protected override void OnDisappearing() { base.OnDisappearing(); }

Expected Behavior

The OnAppearing() and OnDisappearing() methods should consistently execute properly, both when navigating between pages and when minimizing and restoring the application on iOS.

Actual Behavior

After minimizing and then maximizing the application on iOS, the OnAppearing() and OnDisappearing() methods do not execute as expected.

Basic Information

Environment

Show/Hide Visual Studio info ``` ```

Build Logs

Screenshots

Reproduction Link

Workaround

jfversluis commented 10 months ago

Duplicate of #6919