Closed Tbwas closed 5 years ago
Same issue here.
NSString *js = @"dispatch_async_global_queue(function(){dispatch_sync_main(function(){});});"; [JPEngine evaluateScript:js];
https://github.com/bang590/JSPatch/blob/master/JSPatch/JPEngine.m#L280 https://github.com/bang590/JSPatch/blob/master/JSPatch/JPEngine.m#L273 见这两行,dispatch_async_global_queue 和 dispatch_sync 都会调 js 函数。
解决方法,改成dispatch_async_main
上述代码会发生死锁,不知道是否已知