| 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 122 of file FlutterDartVMServicePublisher.mm.

157 :(BOOL)enableVMServicePublication {
158 self = [super init];
159 NSAssert(self, @"Super must not return null on init.");
160
161 _delegate = [[DartVMServiceDNSServiceDelegate alloc] init];
162 _enableVMServicePublication = enableVMServicePublication;
163 __weak __typeof(self) weakSelf = self;
164
165 fml::MessageLoop::EnsureInitializedForCurrentThread();
166
167 _callbackHandle = flutter::DartServiceIsolate::AddServerStatusCallback(
168 [weakSelf, runner = fml::MessageLoop::GetCurrent().GetTaskRunner()](const std::string& uri) {
169 if (!uri.empty()) {
170 runner->PostTask([weakSelf, uri]() {
171 FlutterDartVMServicePublisher* strongSelf = weakSelf;
172 // uri comes in as something like 'http://127.0.0.1:XXXXX/' where XXXXX is the port
173 // number.
174 if (strongSelf) {
175 NSURL* url =
176 [[NSURL alloc] initWithString:[NSString stringWithUTF8String:uri.c_str()]];
177 strongSelf.url = url;
178 if (strongSelf.enableVMServicePublication) {
179 [[strongSelf delegate] publishServiceProtocolPort:url];
180 }
181 }
182 });
183 }
184 });
185
186 return self;
187 }
self
return self
Definition: FlutterTextureRegistryRelay.mm:19
DartVMServiceDNSServiceDelegate
Definition: FlutterDartVMServicePublisher.mm:65
FlutterDartVMServicePublisher
Definition: FlutterDartVMServicePublisher.h:11
FlutterDartVMServicePublisher::url
NSURL * url
Definition: FlutterDartVMServicePublisher.h:17
flutter
Definition: accessibility_bridge.h:26
fml
Definition: profiler_metrics_ios.mm:41

## ◆ 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