#import <FlutterDartVMServicePublisher.h>
◆ createTxtData:
+ (NSData *) createTxtData: |
|
(NSURL*) |
url |
|
|
implementation |
Definition at line 120 of file FlutterDartVMServicePublisher.mm.
183
184
185 NSString*
path = [[url path] substringFromIndex:MIN(1, [[url path] length])];
186 NSData* pathData = [path dataUsingEncoding:NSUTF8StringEncoding];
187 NSDictionary<NSString*, NSData*>* txtDict = @{
188 @"authCode" : pathData,
189 };
190 return [NSNetService dataFromTXTRecordDictionary:txtDict];
191}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
◆ dealloc
Definition at line 120 of file FlutterDartVMServicePublisher.mm.
193 {
194 [_delegate stopService];
195
197}
static bool RemoveServerStatusCallback(CallbackHandle handle)
Removed a callback previously registered via AddServiceStatusCallback.
◆ initWithEnableVMServicePublication:
- (instancetype) initWithEnableVMServicePublication: |
|
(BOOL) |
NS_DESIGNATED_INITIALIZER |
|
Initial value:
Definition at line 120 of file FlutterDartVMServicePublisher.mm.
147 self = [super init];
148 NSAssert(self, @"Super must not return null on init.");
149
152 __weak __typeof(
self) weakSelf =
self;
153
154 fml::MessageLoop::EnsureInitializedForCurrentThread();
155
156 _callbackHandle =
flutter::DartServiceIsolate::AddServerStatusCallback(
157 [weakSelf, runner =
fml::MessageLoop::GetCurrent().GetTaskRunner()](const
std::
string& uri) {
158 if (!uri.empty()) {
159 runner->PostTask([weakSelf, uri]() {
161
162
163 if (strongSelf) {
165 [[NSURL alloc] initWithString:[NSString stringWithUTF8String:uri.c_str()]];
168 [[strongSelf delegate] publishServiceProtocolPort:url];
169 }
170 }
171 });
172 }
173 });
174
175 return self;
176}
BOOL enableVMServicePublication
◆ NS_UNAVAILABLE [1/2]
- (instancetype) NS_UNAVAILABLE |
|
|
|
◆ NS_UNAVAILABLE [2/2]
+ (instancetype) NS_UNAVAILABLE |
|
|
|
◆ serviceName
+ (NSString *) serviceName |
|
|
|
|
implementation |
◆ delegate
|
readatomicassignimplementation |
◆ enableVMServicePublication
- (BOOL) enableVMServicePublication |
|
readatomicassignimplementation |
◆ url
The documentation for this class was generated from the following files: