Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FlutterPluginAppLifeCycleDelegate.h 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. // Copyright 2013 The Flutter Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
  5. #define FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
  6. #include "FlutterPlugin.h"
  7. NS_ASSUME_NONNULL_BEGIN
  8. /**
  9. * Propagates `UIAppDelegate` callbacks to registered plugins.
  10. */
  11. FLUTTER_EXPORT
  12. @interface FlutterPluginAppLifeCycleDelegate : NSObject
  13. /**
  14. * Registers `delegate` to receive life cycle callbacks via this FlutterPluginAppLifecycleDelegate
  15. * as long as it is alive.
  16. *
  17. * `delegate` will only referenced weakly.
  18. */
  19. - (void)addDelegate:(NSObject<FlutterPlugin>*)delegate;
  20. /**
  21. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  22. *
  23. * @return `NO` if any plugin vetoes application launch.
  24. */
  25. - (BOOL)application:(UIApplication*)application
  26. didFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
  27. /**
  28. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  29. *
  30. * @return `NO` if any plugin vetoes application launch.
  31. */
  32. - (BOOL)application:(UIApplication*)application
  33. willFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
  34. /**
  35. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  36. */
  37. - (void)applicationDidBecomeActive:(UIApplication*)application;
  38. /**
  39. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  40. */
  41. - (void)applicationWillResignActive:(UIApplication*)application;
  42. /**
  43. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  44. */
  45. - (void)applicationDidEnterBackground:(UIApplication*)application;
  46. /**
  47. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  48. */
  49. - (void)applicationWillEnterForeground:(UIApplication*)application;
  50. /**
  51. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  52. */
  53. - (void)applicationWillTerminate:(UIApplication*)application;
  54. /**
  55. * Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
  56. */
  57. #pragma GCC diagnostic push
  58. #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
  59. - (void)application:(UIApplication*)application
  60. didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
  61. #pragma GCC diagnostic pop
  62. /**
  63. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  64. */
  65. - (void)application:(UIApplication*)application
  66. didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
  67. /**
  68. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  69. */
  70. - (void)application:(UIApplication*)application
  71. didReceiveRemoteNotification:(NSDictionary*)userInfo
  72. fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
  73. /**
  74. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  75. */
  76. - (void)application:(UIApplication*)application
  77. didReceiveLocalNotification:(UILocalNotification*)notification;
  78. /**
  79. * Calls all plugins registered for `UNUserNotificationCenterDelegate` callbacks.
  80. */
  81. - (void)userNotificationCenter:(UNUserNotificationCenter*)center
  82. willPresentNotification:(UNNotification*)notification
  83. withCompletionHandler:
  84. (void (^)(UNNotificationPresentationOptions options))completionHandler
  85. API_AVAILABLE(ios(10));
  86. /**
  87. * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
  88. * some plugin handles the request.
  89. *
  90. * @return `YES` if any plugin handles the request.
  91. */
  92. - (BOOL)application:(UIApplication*)application
  93. openURL:(NSURL*)url
  94. options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options;
  95. /**
  96. * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
  97. * some plugin handles the request.
  98. *
  99. * @return `YES` if any plugin handles the request.
  100. */
  101. - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url;
  102. /**
  103. * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
  104. * some plugin handles the request.
  105. *
  106. * @return `YES` if any plugin handles the request.
  107. */
  108. - (BOOL)application:(UIApplication*)application
  109. openURL:(NSURL*)url
  110. sourceApplication:(NSString*)sourceApplication
  111. annotation:(id)annotation;
  112. /**
  113. * Calls all plugins registered for `UIApplicationDelegate` callbacks.
  114. */
  115. - (void)application:(UIApplication*)application
  116. performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
  117. completionHandler:(void (^)(BOOL succeeded))completionHandler
  118. API_AVAILABLE(ios(9.0));
  119. /**
  120. * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
  121. * some plugin handles the request.
  122. *
  123. * @return `YES` if any plugin handles the request.
  124. */
  125. - (BOOL)application:(UIApplication*)application
  126. handleEventsForBackgroundURLSession:(nonnull NSString*)identifier
  127. completionHandler:(nonnull void (^)(void))completionHandler;
  128. /**
  129. * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
  130. * some plugin handles the request.
  131. *
  132. * @returns `YES` if any plugin handles the request.
  133. */
  134. - (BOOL)application:(UIApplication*)application
  135. performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
  136. /**
  137. * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
  138. * some plugin handles the request.
  139. *
  140. * @return `YES` if any plugin handles the request.
  141. */
  142. - (BOOL)application:(UIApplication*)application
  143. continueUserActivity:(NSUserActivity*)userActivity
  144. restorationHandler:(void (^)(NSArray*))restorationHandler;
  145. @end
  146. NS_ASSUME_NONNULL_END
  147. #endif // FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_