5#define FML_USED_ON_EMBEDDER
7#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterHeadlessDartRunner.h"
11#include "flutter/fml/make_copyable.h"
12#include "flutter/fml/message_loop.h"
13#include "flutter/shell/common/engine.h"
14#include "flutter/shell/common/rasterizer.h"
15#include "flutter/shell/common/run_configuration.h"
16#include "flutter/shell/common/shell.h"
17#include "flutter/shell/common/switches.h"
18#include "flutter/shell/common/thread_host.h"
19#import "flutter/shell/platform/darwin/common/command_line.h"
20#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h"
21#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject_Internal.h"
22#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine_Internal.h"
23#import "flutter/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.h"
24#import "flutter/shell/platform/darwin/ios/platform_view_ios.h"
29- (instancetype)initWithName:(NSString*)labelPrefix project:(
FlutterDartProject*)projectOrNil {
30 return [
self initWithName:labelPrefix project:projectOrNil allowHeadlessExecution:YES];
33- (instancetype)initWithName:(NSString*)labelPrefix
35 allowHeadlessExecution:(
BOOL)allowHeadlessExecution {
36 NSAssert(allowHeadlessExecution == YES,
37 @"Cannot initialize a FlutterHeadlessDartRunner without headless execution.");
38 return [
self initWithName:labelPrefix
40 allowHeadlessExecution:allowHeadlessExecution
41 restorationEnabled:NO];
44- (instancetype)initWithName:(NSString*)labelPrefix
46 allowHeadlessExecution:(
BOOL)allowHeadlessExecution
47 restorationEnabled:(
BOOL)restorationEnabled {
48 NSAssert(allowHeadlessExecution == YES,
49 @"Cannot initialize a FlutterHeadlessDartRunner without headless execution.");
50 return [
super initWithName:labelPrefix
52 allowHeadlessExecution:allowHeadlessExecution
53 restorationEnabled:restorationEnabled];
57 return [
self initWithName:@"io.flutter.headless" project:nil];