Skip to content
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

Issues in iOS #17

Open
sanjaychans opened this issue Jun 21, 2024 · 2 comments
Open

Issues in iOS #17

sanjaychans opened this issue Jun 21, 2024 · 2 comments

Comments

@sanjaychans
Copy link

Thank you for the great work. The plugin works well in Android. But in iOS, not as much. Whenever pages are popped off the stack, the application crashes with one of the errors being an InvalidOperationException - Page cannot be null here. Also in Teardown, ListView itemsSource to null also raises a NullReferenceException.
Are there anything specific for iOS that needs to be done?

@AdamEssenmacher
Copy link
Owner

The nature of how this toolkit works makes it really delicate. It actively works against MAUI's design intent, and some of the targeted fixes it applies should be understood to be 'hacks' that target specific MAUI bugs that may change over time. I do say in the readme:

While quite effective, TearDownBehavior.Cascade is an extremely destructive tool. As such, it's important that you understand what it does. If it runs prematurely, it will bork your app.

Over the past few months, the MAUI team has taken notice of many of the issues highlighted by this toolkit. They've fixed a bunch of them, which may make some of the target fixes obsolete (or even cause bugs or crashes like you've noticed).

I haven't been able to work on this toolkit actively for the last few months, since these memory issues forced me to shelve my own Xamarin migration and I haven't been able to return to it.

I will be improving the toolkit as soon as I'm able to return to full MAUI development. Until then, I would advise you to use this toolkit's source code as a guide, as the patterns and principles it is based on are still very relevant.

One other thing I'll point you to is that the behaviors in this toolkit include an escape hatch to exclude visual subtrees from their effects, so you can opt-out in places where they might be misbehaving.

All that said, repro projects, actual stack traces, and error messages are always helpful. So are PRs to help move things along :)

@sanjaychans
Copy link
Author

Appreciate the response and guidance. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants