fix: Use +load for registering Frame Processors (#1308)

Fixes crash with Xcode 14
This commit is contained in:
LazyAfternoons
2022-10-28 13:12:44 +02:00
committed by GitHub
parent 6b32cd9cd7
commit 3416e94b18

View File

@@ -53,7 +53,7 @@ objc_name : NSObject<FrameProcessorPluginBase>
@end \
@implementation objc_name (FrameProcessorPlugin) \
\
__attribute__((constructor)) static void VISION_CONCAT(initialize_, objc_name)() \
+(void)load \
{ \
[FrameProcessorPluginRegistry addFrameProcessorPlugin:@"__" @ #name callback:^id(Frame* frame, NSArray<id>* args) { \
return [objc_name callback:frame withArgs:args]; \