-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix iOS lifecycle #660
Fix iOS lifecycle #660
Conversation
...navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/platform/LifecycleHelper.kt
Fixed
Show fixed
Hide fixed
# Conflicts: # CHANGELOG.md
@@ -18,6 +18,7 @@ Please refer to [2.0.0-alpha10 – Migration guide](2.0.0-alpha10.md) | |||
- [#654](https://github.com/bumble-tech/appyx/pull/654) - Renamings | |||
- [#657](https://github.com/bumble-tech/appyx/pull/657) - Rename ParentNode & Node to Node and LeafNode | |||
- [#644](https://github.com/bumble-tech/appyx/pull/644) – Refactor AppyxComponent and application of draggable modifier | |||
- [#660](https://github.com/bumble-tech/appyx/pull/660) - Make IosNodeHost to receive a Lifecycle class to fix iOS lifecycle problems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to pending changes, alpha10 is already released
@@ -17,6 +17,7 @@ Please refer to [2.0.0-alpha10 – Migration guide](2.0.0-alpha10.md) | |||
- [#652](https://github.com/bumble-tech/appyx/pull/652) - KSP processor renamed from `mutable-ui-processor` to `appyx-processor` | |||
- [#654](https://github.com/bumble-tech/appyx/pull/654) - Renamings | |||
- [#657](https://github.com/bumble-tech/appyx/pull/657) - Rename ParentNode & Node to Node and LeafNode | |||
- [#660](https://github.com/bumble-tech/appyx/pull/660) - Make IosNodeHost to receive a Lifecycle class to fix iOS lifecycle problems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to surround code related names with `
} | ||
.onOpenURL { incomingURL in | ||
Main_iosKt.handleDeepLinks(url: incomingURL) | ||
} | ||
.onChange(of: scenePhase) { newPhase in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: fix indentation
.onChange(of: scenePhase) { newPhase in | ||
switch newPhase { | ||
case .background: appDelegate.lifecycleHolder.lifecycleHelper.created() | ||
case .inactive: appDelegate.lifecycleHolder.lifecycleHelper.created() | ||
case .active: appDelegate.lifecycleHolder.lifecycleHelper.resumed() | ||
@unknown default: break | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: fix indentation
Fixed in #670 |
Fix iOS Lifecycle
Currently, the app's iOS lifecycle wasn't working as expected, when the app was going to the background the Appyx Nodes were not updating their lifecycle states as expected.
This PR solves the issue by making the iOS app to pass the app Lifecycle to the
iOSNodeHost
.VEED.CREATE.Edit.mp4
Check list
CHANGELOG.md
if required.