Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
FlutterAppDelegate should forward delegate methods to plugins that register for them #9682
I think @mravn-google was looking at this but I couldn't find an issue for it.
If FlutterAppDelegate provided a way for plugins to install handlers for common UIApplicationDelegate methods, this would reduce the amount of boilerplate the devs would have to add to their AppDelegate.m for plugins like push messaging, analytics, etc. in the common case.
Below are the (non-deprecated) UIApplicationDelegate methods. Many of them may introduce cross-plugin interference, if we (or plugin implementors) are not careful.
Examples: some of them take a completion handler argument, and can logically only be delegated to one plugin. Others might be sensitive to plugin ordering, like those that take NSCoder arguments for storing/restoring state.
Another issue is that implementing some of these methods require a corresponding configuration entry in Info.plist, lest Xcode will say e.g.
Do we want to add such an entry to our templates?