fix: Use +load
for registering Frame Processors (#1308)
Fixes crash with Xcode 14
This commit is contained in:
parent
6b32cd9cd7
commit
3416e94b18
@ -53,7 +53,7 @@ objc_name : NSObject<FrameProcessorPluginBase>
|
|||||||
@end \
|
@end \
|
||||||
@implementation objc_name (FrameProcessorPlugin) \
|
@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) { \
|
[FrameProcessorPluginRegistry addFrameProcessorPlugin:@"__" @ #name callback:^id(Frame* frame, NSArray<id>* args) { \
|
||||||
return [objc_name callback:frame withArgs:args]; \
|
return [objc_name callback:frame withArgs:args]; \
|
||||||
|
Loading…
Reference in New Issue
Block a user