Skip to content

[quick_actions_ios] Needs to adopt UIScene lifecycle #170179

Description

@vashworth

After adopting UIScene lifecycle in Flutter apps, quick_actions is running into errors:

This is most likely due to it relying on application lifecycle events, which are no longer called.

For example,

  public func application(
    _ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem,
    completionHandler: @escaping (Bool) -> Void
  ) -> Bool {
    handleShortcut(shortcutItem.type)
    return true
  }

https://github.com/flutter/packages/blob/c3c4c5a01ab077990b0aae509090d987a660b88e/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/QuickActionsPlugin.swift#L39-L45

Apple's docs state

This method is not called for scene-based apps. If you have a scene-based app, implement windowScene(_:performActionFor:completionHandler:) in your scene delegate instead.

https://developer.apple.com/documentation/uikit/uiapplicationdelegate/application(_:performactionfor:completionhandler:)

Test failures:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8712791415816897953/+/u/Run_package_tests/native_test/stdout

This may be blocked by: #130445

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesp: quick_actionsQuickActions pluginplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions