#import <FlutterDartVMServicePublisher.h>
◆ initWithEnableVMServicePublication:
- (instancetype) initWithEnableVMServicePublication: |
|
(BOOL) |
NS_DESIGNATED_INITIALIZER |
|
Definition at line 165 of file FlutterDartVMServicePublisher.mm.
165 :(BOOL)enableVMServicePublication {
167 NSAssert(
self,
@"Super must not return null on init.");
170 _enableVMServicePublication = enableVMServicePublication;
171 _weakFactory = std::make_unique<fml::WeakPtrFactory<FlutterDartVMServicePublisher>>(
self);
173 fml::MessageLoop::EnsureInitializedForCurrentThread();
175 _callbackHandle = flutter::DartServiceIsolate::AddServerStatusCallback(
177 runner = fml::MessageLoop::GetCurrent().GetTaskRunner()](
const std::string& uri) {
179 runner->PostTask([weak, uri]() {
183 NSURL* url = [[[NSURL alloc]
184 initWithString:[NSString stringWithUTF8String:uri.c_str()]] autorelease];
185 weak.get().url = url;
186 if (weak.get().enableVMServicePublication) {
187 [[weak.get() delegate] publishServiceProtocolPort:url];
References _weakFactory.
◆ 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: