IssueRaiser

Plugins could avoid warnings by installing UIApplicationDelegate methods dynamically

### Issue about warning message on console https://github.com/flutter/engine/pull/8843 Right now iOS apps have the following in their logs: > You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist. A possible improvement would be to avoid implementing that method directly, and instead only add an implementation using `class_addMethod` if we detect that it's needed for registered plugins. If no plugin implements `application:didReceiveRemoteNotification:fetchCompletionHandler:` then `FlutterAppDelegate` wouldn't implement it either, and thus would avoid the warning. The same could be done for other `UIApplicationDelegate` methods as well. /cc @mravn-google @szakarias @jakobr-google @mit-mit @Hixie @goderbauer ------------------------------------------------------------------------------------------------------------------------ Edited by cyanglaz: _The original issue mentioned above has been fixed with https://github.com/flutter/engine/pull/8843. However, there is a related but different issue regarding receiving email warning from Apple when uploading builds. I have summarized the discussions and works related to it in below section for easier understanding the bug and where we are at:_ ### Issue about warning email from Apple When uploading a Flutter App to Apple, one might receive an warning Email like below: ``` De

Posted by collinjackson on May 11, 2017, 1:28 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (SaaS)

Plugins could avoid warnings by installing UIApplicationDelegate methods dynamically

collinjacksonMay 11, 2017, 1:28 AM

### Issue about warning message on console https://github.com/flutter/engine/pull/8843 Right now iOS apps have the following in their logs: > You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist. A possible improvement would be to avoid implementing that method directly, and instead only add an implementation using `class_addMethod` if we detect that it's needed for registered plugins. If no plugin implements `application:didReceiveRemoteNotification:fetchCompletionHandler:` then `FlutterAppDelegate` wouldn't implement it either, and thus would avoid the warning. The same could be done for other `UIApplicationDelegate` methods as well. /cc @mravn-google @szakarias @jakobr-google @mit-mit @Hixie @goderbauer ------------------------------------------------------------------------------------------------------------------------ Edited by cyanglaz: _The original issue mentioned above has been fixed with https://github.com/flutter/engine/pull/8843. However, there is a related but different issue regarding receiving email warning from Apple when uploading builds. I have summarized the discussions and works related to it in below section for easier understanding the bug and where we are at:_ ### Issue about warning email from Apple When uploading a Flutter App to Apple, one might receive an warning Email like below: ``` De

Comments (0)

No comments yet. Start the discussion.

Comment on this issue