From 129a14f2591250444dd620220242a9fbbf3ea993 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 18 Mar 2019 19:32:49 -0700 Subject: [PATCH] Export FlutterSemanticsUpdateNotification and improve docs (flutter/engine#8203) * Export FlutterSemanticsUpdateNotification and improve docs --- .../platform/darwin/ios/framework/Headers/FlutterEngine.h | 8 +++++++- .../darwin/ios/framework/Headers/FlutterViewController.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h index e70877609c..bf1e757687 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h @@ -146,10 +146,16 @@ FLUTTER_EXPORT * This method must only be called after launching the engine via * `-runWithEntrypoint:` or `-runWithEntryPoint:libraryURI`. * + * Although this method returns synchronously, it does not guarantee that a + * semantics tree is actually available when the method returns. It + * synchronously ensures that the next frame the Flutter framework creates will + * have a semantics tree. + * * You can subscribe to semantics updates via `NSNotificationCenter` by adding * an observer for the name `FlutterSemanticsUpdateNotification`. The `object` * parameter will be the `FlutterViewController` associated with the semantics - * update. + * update. This will asynchronously fire after a semantics tree has actually + * built (which may be some time after the frame has been rendered). */ - (void)ensureSemanticsEnabled; diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h index 5881b3c1ae..b38b118fff 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h @@ -23,6 +23,7 @@ * The object passed as the sender is the `FlutterViewController` associated * with the update. */ +FLUTTER_EXPORT extern NSNotificationName const FlutterSemanticsUpdateNotification; /**