#include <FlutterDartVMServicePublisher.h>
◆ initWithEnableVMServicePublication:
| - (instancetype) initWithEnableVMServicePublication: |
|
(BOOL) |
NS_DESIGNATED_INITIALIZER |
|
Initial value:
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
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]() {
172
173
174 if (strongSelf) {
176 [[NSURL alloc] initWithString:[NSString stringWithUTF8String:uri.c_str()]];
178 if (strongSelf.enableVMServicePublication) {
179 [[strongSelf delegate] publishServiceProtocolPort:url];
180 }
181 }
182 });
183 }
184 });
185
186 return self;
187}
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: