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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]; \