7 #include "flutter/fml/logging.h"
8 #include "flutter/lib/ui/plugins/callback_cache.h"
13 [_callbackName release];
14 [_callbackClassName release];
15 [_callbackLibraryPath release];
24 auto info = flutter::DartCallbackCache::GetCallbackInformation(handle);
25 if (info ==
nullptr) {
29 new_info.
callbackName = [NSString stringWithUTF8String:info->name.c_str()];
30 new_info.
callbackClassName = [NSString stringWithUTF8String:info->class_name.c_str()];
35 + (void)setCachePath:(NSString*)path {
36 FML_DCHECK(path != nil);
37 flutter::DartCallbackCache::SetCachePath([path UTF8String]);
38 NSString* cache_path =
39 [NSString stringWithUTF8String:flutter::DartCallbackCache::GetCachePath().c_str()];
42 if (![[NSFileManager defaultManager] fileExistsAtPath:cache_path]) {
43 [[NSFileManager defaultManager] createFileAtPath:cache_path contents:nil attributes:nil];
45 NSURL* URL = [NSURL fileURLWithPath:cache_path];
46 BOOL success = [URL setResourceValue:[NSNumber numberWithBool:YES]
47 forKey:NSURLIsExcludedFromBackupKey
50 NSLog(
@"Error excluding %@ from backup %@", [URL lastPathComponent], error);