#include <FlutterDartVMServicePublisher.h>
◆ initWithEnableVMServicePublication:
| - (instancetype) initWithEnableVMServicePublication: |
|
(BOOL) |
NS_DESIGNATED_INITIALIZER |
|
Initial value:
Definition at line 120 of file FlutterDartVMServicePublisher.mm.
155 :(
BOOL)enableVMServicePublication {
156 self = [super init];
157 NSAssert(self, @"Super must not return null on init.");
158
160 _enableVMServicePublication = enableVMServicePublication;
161 __weak __typeof(
self) weakSelf =
self;
162
163 fml::MessageLoop::EnsureInitializedForCurrentThread();
164
165 _callbackHandle =
flutter::DartServiceIsolate::AddServerStatusCallback(
166 [weakSelf, runner =
fml::MessageLoop::GetCurrent().GetTaskRunner()](const
std::
string& uri) {
167 if (!uri.empty()) {
168 runner->PostTask([weakSelf, uri]() {
170
171
172 if (strongSelf) {
174 [[NSURL alloc] initWithString:[NSString stringWithUTF8String:uri.c_str()]];
176 if (strongSelf.enableVMServicePublication) {
177 [[strongSelf delegate] publishServiceProtocolPort:url];
178 }
179 }
180 });
181 }
182 });
183
184 return self;
185}
References FML_DLOG.
◆ NS_UNAVAILABLE [1/2]
| - (instancetype) NS_UNAVAILABLE |
|
|
|
◆ NS_UNAVAILABLE [2/2]
| + (instancetype) NS_UNAVAILABLE |
|
|
|
◆ url
The documentation for this class was generated from the following files: