| Flutter iOS Embedder |

Instance Methods | Class Methods | Properties | List of all members
FlutterDartVMServicePublisher Class Reference

`#import <FlutterDartVMServicePublisher.h>`

Inheritance diagram for FlutterDartVMServicePublisher:

## Instance Methods
(instancetype) | - initWithEnableVMServicePublication:
(instancetype) | - NS_UNAVAILABLE

## Class Methods
(instancetype) | + NS_UNAVAILABLE

## Properties
NSURL * | url

## Detailed Description

Definition at line 10 of file FlutterDartVMServicePublisher.h.

## Method Documentation

## ◆ initWithEnableVMServicePublication:

- (instancetype) initWithEnableVMServicePublication: |  | (BOOL) | NS_DESIGNATED_INITIALIZER |

Initial value:
{
flutter::DartServiceIsolate::CallbackHandle _callbackHandle

Definition at line 145 of file FlutterDartVMServicePublisher.mm.

145 :(BOOL)enableVMServicePublication {
146 self = [super init];
147 NSAssert(self, @"Super must not return null on init.");
148
149 _delegate = [[DartVMServiceDNSServiceDelegate alloc] init];
150 _enableVMServicePublication = enableVMServicePublication;
151 __weak __typeof(self) weakSelf = self;
152
153 fml::MessageLoop::EnsureInitializedForCurrentThread();
154
155 _callbackHandle = flutter::DartServiceIsolate::AddServerStatusCallback(
156 [weakSelf, runner = fml::MessageLoop::GetCurrent().GetTaskRunner()](const std::string& uri) {
157 if (!uri.empty()) {
158 runner->PostTask([weakSelf, uri]() {
159 FlutterDartVMServicePublisher* strongSelf = weakSelf;
160 // uri comes in as something like 'http://127.0.0.1:XXXXX/' where XXXXX is the port
161 // number.
162 if (strongSelf) {
163 NSURL* url =
164 [[NSURL alloc] initWithString:[NSString stringWithUTF8String:uri.c_str()]];
165 strongSelf.url = url;
166 if (strongSelf.enableVMServicePublication) {
167 [[strongSelf delegate] publishServiceProtocolPort:url];
168 }
169 }
170 });
171 }
172 });
173
174 return self;
175 }

## ◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE |  |  |

## ◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE |  |  |

## Property Documentation

## ◆ url

- (NSURL*) url
| read nonatomic assign

Definition at line 17 of file FlutterDartVMServicePublisher.h.

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.h
- shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm

self
return self
Definition: FlutterTextureRegistryRelay.mm:19
FlutterDartVMServicePublisher::url
NSURL * url
Definition: FlutterDartVMServicePublisher.h:17
flutter
Definition: accessibility_bridge.h:27
fml
Definition: profiler_metrics_ios.mm:41
DartVMServiceDNSServiceDelegate
Definition: FlutterDartVMServicePublisher.mm:64
FlutterDartVMServicePublisher
Definition: FlutterDartVMServicePublisher.h:10