-
Notifications
You must be signed in to change notification settings - Fork 6k
Add capability to add AppDelegate as UNUserNotificationCenterDelegate #9864
Conversation
| @interface FlutterAppDelegate : UIResponder <UIApplicationDelegate, | ||
| FlutterPluginRegistry, | ||
| FlutterAppLifeCycleProvider, | ||
| UNUserNotificationCenterDelegate> |
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.
This would need to be guarded, it's iOS 10+.
I thought @cyanglaz made this stuff happen dynamically?
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.
I don't believe this would cause a crash on iOS < 10. The documentation for Firebase Messaging gives instructions on how to add it to your app. Even despite supporting 8+. I also tested this on a 9.0 iOS simulator and the app still compiled and installed on device.
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.
Also, @cyanglaz and I talked offline. He was able to dynamically add methods, but not implementing protocols.
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.
UNUserNotificationCenterDelegate wasn't added until IOS10. We'll have to guard this, otherwise warnings will get displayed and people using -Werror will fail.
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.
I added an if statement, but I'm confident I didn't implement it correctly. How would I go about doing this?
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.
You can just wrap the macro around the one protocol you need to add instead of duplicating the entire class. Also, use __IPHONE_10_0 instead of 100000.
@interface FlutterAppDelegate : UIResponder <UIApplicationDelegate,
FlutterPluginRegistry,
FlutterAppLifeCycleProvider,
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
UNUserNotificationCenterDelegate
#endif
>
@property(strong, nonatomic) UIWindow* window;
@end
|
@bparrishMines @dnfield is this PR still WIP? |
| - (void)userNotificationCenter:(UNUserNotificationCenter*)center | ||
| didReceiveNotificationResponse:(UNNotificationResponse*)response | ||
| withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10)) { | ||
| if (@available(iOS 10.0, *)) { |
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.
I don't think you need this anymore - have you tested compilation on something targetting iOS 9?
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.
The API_AVAILABLE in the header is enough to give the warning. Are you trying to guard against people ignoring the warning and calling it anyway with a nil center and response?
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.
I had some individual comments, but it looks like the intention is for FlutterAppDelegate and FlutterPlugins to each pass along handle UNUserNotificationCenter notifications. So can this be accomplished by conforming FlutterApplicationLifeCycleDelegate to UNUserNotificationCenterDelegate, and not touching the FlutterAppDelegate class or FlutterPlugin protocol? Then you wouldn't need any availability checks anywhere because UNUserNotificationCenterDelegate is already decorated.
So:
FlutterPlugin.h:
@protocol FlutterApplicationLifeCycleDelegate
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_4
<UNUserNotificationCenterDelegate>
#endif
FlutterAppDelegate.mm:
- (void)userNotificationCenter:(UNUserNotificationCenter*)center
didReceiveNotificationResponse:(UNNotificationResponse*)response
withCompletionHandler:(void (^)(void))completionHandler {
[_lifeCycleDelegate userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
}
}
FlutterPluginAppLifeCycleDelegate.mm:
- (void)userNotificationCenter:(UNUserNotificationCenter*)center
didReceiveNotificationResponse:(UNNotificationResponse*)response
withCompletionHandler:(void (^)(void))completionHandler {
for (id<FlutterPlugin> plugin in _delegates) {
[plugin userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:completionHandler];
}
}
| @interface FlutterAppDelegate : UIResponder <UIApplicationDelegate, | ||
| FlutterPluginRegistry, | ||
| FlutterAppLifeCycleProvider, | ||
| UNUserNotificationCenterDelegate> |
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.
You can just wrap the macro around the one protocol you need to add instead of duplicating the entire class. Also, use __IPHONE_10_0 instead of 100000.
@interface FlutterAppDelegate : UIResponder <UIApplicationDelegate,
FlutterPluginRegistry,
FlutterAppLifeCycleProvider,
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
UNUserNotificationCenterDelegate
#endif
>
@property(strong, nonatomic) UIWindow* window;
@end
| * calls as `UNUserNotificationCenterDelegate` when they are added to | ||
| * `addApplicationLifeCycleDelegate`. | ||
| */ | ||
| - (void)registerAsUserNotificationCenterDelegate; |
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.
This also should have a API_AVAILABLE(ios(10));
But is this thin convenience method necessary? It seems like it would be better for callers to explicitly set the delegate if that's what they want instead of implying there's some additional magic going on. It also hides that calling this will stomp any previous delegates set on the notification center.
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.
The UNUserNotificationCenter is a shared object, so there can only be one UNUserNotificationCenterDelegate. The problem we have now is if two plugins (e.g. firebase_messaging and flutter_local_notifications) need the app to receive notifications, they would both set this delegate and one of the plugins wouldn't receive notifications.
This PR tries to create a shared delegate that all plugins can listen to. More detail is in this issue flutter/flutter#22099
| */ | ||
| - (void)userNotificationCenter:(UNUserNotificationCenter*)center | ||
| didReceiveNotificationResponse:(UNNotificationResponse*)response | ||
| withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10)) { |
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.
You don't need the API_AVAILABLE in the .mm.
| - (void)userNotificationCenter:(UNUserNotificationCenter*)center | ||
| didReceiveNotificationResponse:(UNNotificationResponse*)response | ||
| withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10)) { | ||
| if (@available(iOS 10.0, *)) { |
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.
The API_AVAILABLE in the header is enough to give the warning. Are you trying to guard against people ignoring the warning and calling it anyway with a nil center and response?
| } | ||
|
|
||
| - (void)registerAsUserNotificationCenterDelegate { | ||
| if ([UNUserNotificationCenter class] != nil) { |
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.
You don't need this if you add availability to registerAsUserNotificationCenterDelegate.
| - (void)userNotificationCenter:(UNUserNotificationCenter*)center | ||
| didReceiveNotificationResponse:(UNNotificationResponse*)response | ||
| withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10)) { | ||
| if (@available(iOS 10.0, *)) { |
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.
Same here, no API_AVAILABLE in the implementation, and you don't need the @availabile check because the header is decorated with the API availability.
| didReceiveNotificationResponse:(UNNotificationResponse*)response | ||
| withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10)) { | ||
| if (@available(iOS 10.0, *)) { | ||
| for (id<FlutterPlugin> plugin in _pluginDelegates) { |
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.
It looks like this was renamed to _delegates in 273f4cf#diff-71f628ed3f0d51c80d58e053985f8a81R22? Does this code compile?
| withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10)) { | ||
| if (@available(iOS 10.0, *)) { | ||
| for (id<FlutterPlugin> plugin in _pluginDelegates) { | ||
| if (!plugin) { |
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.
You don't need this nil check because [nil respondsToSelector:_cmd] is always NO. It's better to just call selectors on nil instead of nil-checking everywhere since the message sends are already optimized to handle nil.
3160e21 to
684361a
Compare
|
This is causing LUCI failures on ToT on all iOS jobs. |
|
@chinmaygarde I can revert this to find out what went wrong. |
|
I am also trying to reproduce to see if we can just roll forward. |
|
Errors indicate something isn't guarded properly for <iOS 10.0... |
|
It looks like the line |
|
Looks like the -[userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:] implementation needs the __IPHONE_OS_VERSION_MAX_ALLOWED check (not API_AVAILABLE) |
|
#12084 fixes the tree. |
[email protected]:flutter/engine.git/compare/7ea9884ab00e...5b94c8a git log 7ea9884..5b94c8a --no-merges --oneline 2019-09-11 [email protected] Revert "Roll src/third_party/dart be66176534..ec7ec4ecf7 (37 commits)" (flutter/engine#12223) 2019-09-11 [email protected] Do not generate kernel platform files on topaz tree (flutter/engine#12222) 2019-09-11 [email protected] Don't disable toString in release mode for dart:ui classes (flutter/engine#12204) 2019-09-11 [email protected] Roll fuchsia/sdk/core/linux-amd64 from 7gDBN... to u7Q31... (flutter/engine#12221) 2019-09-11 [email protected] Roll src/third_party/skia d96ef09317d6..120e7d6766e4 (2 commits) (flutter/engine#12220) 2019-09-11 [email protected] Roll fuchsia/sdk/core/mac-amd64 from vDk46... to _nS67... (flutter/engine#12219) 2019-09-11 [email protected] Namespace patched SDK names to not conflict with Topaz (flutter/engine#12218) 2019-09-11 [email protected] Roll src/third_party/dart ca7baa4013..4d5e15abde (29 commits) 2019-09-11 [email protected] Roll src/third_party/skia 14318c140949..d96ef09317d6 (2 commits) (flutter/engine#12216) 2019-09-11 [email protected] Roll src/third_party/skia b23a4f9d9442..14318c140949 (2 commits) (flutter/engine#12215) 2019-09-11 [email protected] Roll src/third_party/skia 26ac0467cb4c..b23a4f9d9442 (2 commits) (flutter/engine#12214) 2019-09-11 [email protected] Roll src/third_party/dart 7bbfd532de..ca7baa4013 (3 commits) 2019-09-11 [email protected] Roll fuchsia/sdk/core/linux-amd64 from R1yqu... to 7gDBN... (flutter/engine#12212) 2019-09-11 [email protected] Roll fuchsia/sdk/core/mac-amd64 from spUG2... to vDk46... (flutter/engine#12210) 2019-09-11 [email protected] Roll buildroot and Fuchsia toolchain and unblock the Fuchsia/Linux autoroller manually. (flutter/engine#12209) 2019-09-11 [email protected] Roll src/third_party/skia 4fe30e15c06c..26ac0467cb4c (2 commits) (flutter/engine#12207) 2019-09-11 [email protected] Only build the x64 variant of Fuchsia on the try-jobs. (flutter/engine#12206) 2019-09-10 [email protected] Don't load Roboto by default (flutter/engine#12205) 2019-09-10 [email protected] Roll src/third_party/dart 300c3333d1..7bbfd532de (5 commits) 2019-09-10 [email protected] Roll src/third_party/skia 66d8006c2bb1..4fe30e15c06c (11 commits) (flutter/engine#12202) 2019-09-10 [email protected] add a convenience CLI tool for building and testing web engine (flutter/engine#12197) 2019-09-10 [email protected] [flutter_runner] Generate symbols for the Dart VM profiler (flutter/engine#12048) 2019-09-10 [email protected] Add custom test plugin that supports screenshot tests (flutter/engine#12079) 2019-09-10 [email protected] Move the Fuchsia tryjob into a its own step and disable LTO. (flutter/engine#12190) 2019-09-10 [email protected] Roll src/third_party/dart 62f78a7abb..300c3333d1 (6 commits) 2019-09-10 [email protected] Roll src/third_party/skia b88894c8811b..66d8006c2bb1 (5 commits) (flutter/engine#12178) 2019-09-10 [email protected] [flutter_runner] Port the accessibility bridge from Topaz (flutter/engine#12054) 2019-09-10 [email protected] Smooth out iOS irregular input events delivery (flutter/engine#11817) 2019-09-10 [email protected] Roll src/third_party/dart ccb6ba948b..62f78a7abb (3 commits) 2019-09-10 [email protected] Make ImageShader implement Shader for web ui (flutter/engine#12161) 2019-09-10 [email protected] Roll src/third_party/dart 2e8d912848..ccb6ba948b (30 commits) 2019-09-10 [email protected] Roll src/third_party/skia 9e5c47936b17..b88894c8811b (3 commits) (flutter/engine#12151) 2019-09-10 [email protected] Roll src/third_party/skia 1bf30ce852e0..9e5c47936b17 (2 commits) (flutter/engine#12129) 2019-09-10 [email protected] Roll src/third_party/skia 8cae1e95a23b..1bf30ce852e0 (2 commits) (flutter/engine#12106) 2019-09-10 [email protected] Roll fuchsia/clang/mac-amd64 from H1Qjc... to HfPKR... (flutter/engine#12088) 2019-09-10 [email protected] Don't launch the observatory by default on each embedder unit-test invocation. (flutter/engine#12087) 2019-09-10 [email protected] Roll src/third_party/skia c2d84bfa7421..8cae1e95a23b (4 commits) (flutter/engine#12086) 2019-09-10 [email protected] Roll src/third_party/dart fb14babf59..2e8d912848 (65 commits) 2019-09-10 [email protected] Guard availability of user notification related methods to iOS 10.0 (flutter/engine#12084) 2019-09-09 [email protected] Add capability to add AppDelegate as UNUserNotificationCenterDelegate (flutter/engine#9864) 2019-09-09 [email protected] Add GradientRadial paintStyle implementation (flutter/engine#12081) 2019-09-09 [email protected] Don't quote generic font families (flutter/engine#12080) 2019-09-09 [email protected] Roll src/third_party/skia 28d40b2e7ade..c2d84bfa7421 (3 commits) (flutter/engine#12082) 2019-09-09 [email protected] Remove ENABLE_BITCODE from Scenarios test app (flutter/engine#11839) 2019-09-09 [email protected] Roll src/third_party/skia 4f2674da4bbc..28d40b2e7ade (4 commits) (flutter/engine#12077) ...
[email protected]:flutter/engine.git/compare/7ea9884ab00e...bbb1f12 git log 7ea9884..bbb1f12 --no-merges --oneline 2019-09-12 [email protected] Adjust iOS frame start times to match the platform info (flutter/engine#11802) 2019-09-12 [email protected] Roll src/third_party/skia 50f377e275c3..7c47d41067d4 (3 commits) (flutter/engine#12231) 2019-09-12 [email protected] Revert "Manage iOS contexts separately (#12078)" (flutter/engine#12233) 2019-09-11 [email protected] Manage iOS contexts separately (flutter/engine#12078) 2019-09-11 [email protected] Roll src/third_party/skia 120e7d6766e4..50f377e275c3 (7 commits) (flutter/engine#12224) 2019-09-11 [email protected] Revert "Roll src/third_party/dart be66176534..ec7ec4ecf7 (37 commits)" (flutter/engine#12223) 2019-09-11 [email protected] Do not generate kernel platform files on topaz tree (flutter/engine#12222) 2019-09-11 [email protected] Don't disable toString in release mode for dart:ui classes (flutter/engine#12204) 2019-09-11 [email protected] Roll fuchsia/sdk/core/linux-amd64 from 7gDBN... to u7Q31... (flutter/engine#12221) 2019-09-11 [email protected] Roll src/third_party/skia d96ef09317d6..120e7d6766e4 (2 commits) (flutter/engine#12220) 2019-09-11 [email protected] Roll fuchsia/sdk/core/mac-amd64 from vDk46... to _nS67... (flutter/engine#12219) 2019-09-11 [email protected] Namespace patched SDK names to not conflict with Topaz (flutter/engine#12218) 2019-09-11 [email protected] Roll src/third_party/dart ca7baa4013..4d5e15abde (29 commits) 2019-09-11 [email protected] Roll src/third_party/skia 14318c140949..d96ef09317d6 (2 commits) (flutter/engine#12216) 2019-09-11 [email protected] Roll src/third_party/skia b23a4f9d9442..14318c140949 (2 commits) (flutter/engine#12215) 2019-09-11 [email protected] Roll src/third_party/skia 26ac0467cb4c..b23a4f9d9442 (2 commits) (flutter/engine#12214) 2019-09-11 [email protected] Roll src/third_party/dart 7bbfd532de..ca7baa4013 (3 commits) 2019-09-11 [email protected] Roll fuchsia/sdk/core/linux-amd64 from R1yqu... to 7gDBN... (flutter/engine#12212) 2019-09-11 [email protected] Roll fuchsia/sdk/core/mac-amd64 from spUG2... to vDk46... (flutter/engine#12210) 2019-09-11 [email protected] Roll buildroot and Fuchsia toolchain and unblock the Fuchsia/Linux autoroller manually. (flutter/engine#12209) 2019-09-11 [email protected] Roll src/third_party/skia 4fe30e15c06c..26ac0467cb4c (2 commits) (flutter/engine#12207) 2019-09-11 [email protected] Only build the x64 variant of Fuchsia on the try-jobs. (flutter/engine#12206) 2019-09-10 [email protected] Don't load Roboto by default (flutter/engine#12205) 2019-09-10 [email protected] Roll src/third_party/dart 300c3333d1..7bbfd532de (5 commits) 2019-09-10 [email protected] Roll src/third_party/skia 66d8006c2bb1..4fe30e15c06c (11 commits) (flutter/engine#12202) 2019-09-10 [email protected] add a convenience CLI tool for building and testing web engine (flutter/engine#12197) 2019-09-10 [email protected] [flutter_runner] Generate symbols for the Dart VM profiler (flutter/engine#12048) 2019-09-10 [email protected] Add custom test plugin that supports screenshot tests (flutter/engine#12079) 2019-09-10 [email protected] Move the Fuchsia tryjob into a its own step and disable LTO. (flutter/engine#12190) 2019-09-10 [email protected] Roll src/third_party/dart 62f78a7abb..300c3333d1 (6 commits) 2019-09-10 [email protected] Roll src/third_party/skia b88894c8811b..66d8006c2bb1 (5 commits) (flutter/engine#12178) 2019-09-10 [email protected] [flutter_runner] Port the accessibility bridge from Topaz (flutter/engine#12054) 2019-09-10 [email protected] Smooth out iOS irregular input events delivery (flutter/engine#11817) 2019-09-10 [email protected] Roll src/third_party/dart ccb6ba948b..62f78a7abb (3 commits) 2019-09-10 [email protected] Make ImageShader implement Shader for web ui (flutter/engine#12161) 2019-09-10 [email protected] Roll src/third_party/dart 2e8d912848..ccb6ba948b (30 commits) 2019-09-10 [email protected] Roll src/third_party/skia 9e5c47936b17..b88894c8811b (3 commits) (flutter/engine#12151) 2019-09-10 [email protected] Roll src/third_party/skia 1bf30ce852e0..9e5c47936b17 (2 commits) (flutter/engine#12129) 2019-09-10 [email protected] Roll src/third_party/skia 8cae1e95a23b..1bf30ce852e0 (2 commits) (flutter/engine#12106) 2019-09-10 [email protected] Roll fuchsia/clang/mac-amd64 from H1Qjc... to HfPKR... (flutter/engine#12088) 2019-09-10 [email protected] Don't launch the observatory by default on each embedder unit-test invocation. (flutter/engine#12087) 2019-09-10 [email protected] Roll src/third_party/skia c2d84bfa7421..8cae1e95a23b (4 commits) (flutter/engine#12086) 2019-09-10 [email protected] Roll src/third_party/dart fb14babf59..2e8d912848 (65 commits) 2019-09-10 [email protected] Guard availability of user notification related methods to iOS 10.0 (flutter/engine#12084) 2019-09-09 [email protected] Add capability to add AppDelegate as UNUserNotificationCenterDelegate (flutter/engine#9864) ...
[email protected]:flutter/engine.git/compare/7ea9884ab00e...bbb1f12 git log 7ea9884..bbb1f12 --no-merges --oneline 2019-09-12 [email protected] Adjust iOS frame start times to match the platform info (flutter/engine#11802) 2019-09-12 [email protected] Roll src/third_party/skia 50f377e275c3..7c47d41067d4 (3 commits) (flutter/engine#12231) 2019-09-12 [email protected] Revert "Manage iOS contexts separately (flutter#12078)" (flutter/engine#12233) 2019-09-11 [email protected] Manage iOS contexts separately (flutter/engine#12078) 2019-09-11 [email protected] Roll src/third_party/skia 120e7d6766e4..50f377e275c3 (7 commits) (flutter/engine#12224) 2019-09-11 [email protected] Revert "Roll src/third_party/dart be66176534..ec7ec4ecf7 (37 commits)" (flutter/engine#12223) 2019-09-11 [email protected] Do not generate kernel platform files on topaz tree (flutter/engine#12222) 2019-09-11 [email protected] Don't disable toString in release mode for dart:ui classes (flutter/engine#12204) 2019-09-11 [email protected] Roll fuchsia/sdk/core/linux-amd64 from 7gDBN... to u7Q31... (flutter/engine#12221) 2019-09-11 [email protected] Roll src/third_party/skia d96ef09317d6..120e7d6766e4 (2 commits) (flutter/engine#12220) 2019-09-11 [email protected] Roll fuchsia/sdk/core/mac-amd64 from vDk46... to _nS67... (flutter/engine#12219) 2019-09-11 [email protected] Namespace patched SDK names to not conflict with Topaz (flutter/engine#12218) 2019-09-11 [email protected] Roll src/third_party/dart ca7baa4013..4d5e15abde (29 commits) 2019-09-11 [email protected] Roll src/third_party/skia 14318c140949..d96ef09317d6 (2 commits) (flutter/engine#12216) 2019-09-11 [email protected] Roll src/third_party/skia b23a4f9d9442..14318c140949 (2 commits) (flutter/engine#12215) 2019-09-11 [email protected] Roll src/third_party/skia 26ac0467cb4c..b23a4f9d9442 (2 commits) (flutter/engine#12214) 2019-09-11 [email protected] Roll src/third_party/dart 7bbfd532de..ca7baa4013 (3 commits) 2019-09-11 [email protected] Roll fuchsia/sdk/core/linux-amd64 from R1yqu... to 7gDBN... (flutter/engine#12212) 2019-09-11 [email protected] Roll fuchsia/sdk/core/mac-amd64 from spUG2... to vDk46... (flutter/engine#12210) 2019-09-11 [email protected] Roll buildroot and Fuchsia toolchain and unblock the Fuchsia/Linux autoroller manually. (flutter/engine#12209) 2019-09-11 [email protected] Roll src/third_party/skia 4fe30e15c06c..26ac0467cb4c (2 commits) (flutter/engine#12207) 2019-09-11 [email protected] Only build the x64 variant of Fuchsia on the try-jobs. (flutter/engine#12206) 2019-09-10 [email protected] Don't load Roboto by default (flutter/engine#12205) 2019-09-10 [email protected] Roll src/third_party/dart 300c3333d1..7bbfd532de (5 commits) 2019-09-10 [email protected] Roll src/third_party/skia 66d8006c2bb1..4fe30e15c06c (11 commits) (flutter/engine#12202) 2019-09-10 [email protected] add a convenience CLI tool for building and testing web engine (flutter/engine#12197) 2019-09-10 [email protected] [flutter_runner] Generate symbols for the Dart VM profiler (flutter/engine#12048) 2019-09-10 [email protected] Add custom test plugin that supports screenshot tests (flutter/engine#12079) 2019-09-10 [email protected] Move the Fuchsia tryjob into a its own step and disable LTO. (flutter/engine#12190) 2019-09-10 [email protected] Roll src/third_party/dart 62f78a7abb..300c3333d1 (6 commits) 2019-09-10 [email protected] Roll src/third_party/skia b88894c8811b..66d8006c2bb1 (5 commits) (flutter/engine#12178) 2019-09-10 [email protected] [flutter_runner] Port the accessibility bridge from Topaz (flutter/engine#12054) 2019-09-10 [email protected] Smooth out iOS irregular input events delivery (flutter/engine#11817) 2019-09-10 [email protected] Roll src/third_party/dart ccb6ba948b..62f78a7abb (3 commits) 2019-09-10 [email protected] Make ImageShader implement Shader for web ui (flutter/engine#12161) 2019-09-10 [email protected] Roll src/third_party/dart 2e8d912848..ccb6ba948b (30 commits) 2019-09-10 [email protected] Roll src/third_party/skia 9e5c47936b17..b88894c8811b (3 commits) (flutter/engine#12151) 2019-09-10 [email protected] Roll src/third_party/skia 1bf30ce852e0..9e5c47936b17 (2 commits) (flutter/engine#12129) 2019-09-10 [email protected] Roll src/third_party/skia 8cae1e95a23b..1bf30ce852e0 (2 commits) (flutter/engine#12106) 2019-09-10 [email protected] Roll fuchsia/clang/mac-amd64 from H1Qjc... to HfPKR... (flutter/engine#12088) 2019-09-10 [email protected] Don't launch the observatory by default on each embedder unit-test invocation. (flutter/engine#12087) 2019-09-10 [email protected] Roll src/third_party/skia c2d84bfa7421..8cae1e95a23b (4 commits) (flutter/engine#12086) 2019-09-10 [email protected] Roll src/third_party/dart fb14babf59..2e8d912848 (65 commits) 2019-09-10 [email protected] Guard availability of user notification related methods to iOS 10.0 (flutter/engine#12084) 2019-09-09 [email protected] Add capability to add AppDelegate as UNUserNotificationCenterDelegate (flutter/engine#9864) ...
|
Hey is this PR still in in progress? Will it be merged any soon? |
|
@magicleon94 This PR is already merged. Addition of this feature to |
It looks like we added callbacks for UNUserNotificationCenterDelegate in this PR, but I was unable to find where we set it as the delegate.
The UNUserNotificationCenter is a shared object, so there can only be one UNUserNotificationCenterDelegate. The problem we have now is if two plugins (e.g. firebase_messaging and flutter_local_notifications) need the app to receive notifications, they would both set themselves as this delegate and one of the plugins wouldn't receive notifications.
This PR tries to create a shared delegate that all plugins can listen to. More detail is in this issue flutter/flutter#22099
Related issues:
flutter/flutter#22099