Skip to content

Commit 2d2caa0

Browse files
committed
load AppKit
1 parent 3710094 commit 2d2caa0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Runtime/Unity.NodeApi.Native.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ +(NSBundle *)mainBundleFix
3737
{
3838
@autoreleasepool
3939
{
40-
id callback = [^{cb(data);} copy];
41-
CADisplayLink *link = [[NSClassFromString(@"NSScreen") mainScreen] displayLinkWithTarget:callback selector:@selector(invoke)];
40+
[[NSBundle bundleWithPath:@"/System/Library/Frameworks/AppKit.framework"] load];
41+
CADisplayLink *link = [[NSClassFromString(@"NSScreen") mainScreen] displayLinkWithTarget:[^{cb(data);} copy] selector:@selector(invoke)];
4242
[link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
4343
}
4444
}

0 commit comments

Comments
 (0)