in VisionCamera v1 & v2 there were two ObjC macros that were helping in creation/registration of Frame Processors, but these were removed with v3 This PR reintroduces such macros, which will not only make FP development easier, but also it will also fix issues people had with registration of Swift Frame Processors (+load vs +initialize issues) Docs were also updated to reflect that the macros should be used to correctly initialize and register ObjC/Swift Frame Processors
		
			
				
	
	
		
			18 lines
		
	
	
		
			488 B
		
	
	
	
		
			Objective-C
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			488 B
		
	
	
	
		
			Objective-C
		
	
	
	
	
	
| //
 | |
| //  ExampleSwiftFrameProcessor.m
 | |
| //  VisionCameraExample
 | |
| //
 | |
| //  Created by Mateusz Medrek on 02/10/2023.
 | |
| //
 | |
| 
 | |
| #if __has_include(<VisionCamera/FrameProcessorPlugin.h>)
 | |
| #import <VisionCamera/FrameProcessorPlugin.h>
 | |
| #import <VisionCamera/FrameProcessorPluginRegistry.h>
 | |
| 
 | |
| #import "VisionCameraExample-Swift.h"
 | |
| 
 | |
| // // Example for a Swift Frame Processor plugin automatic registration
 | |
| VISION_EXPORT_SWIFT_FRAME_PROCESSOR(ExampleSwiftFrameProcessorPlugin, example_kotlin_swift_plugin)
 | |
| 
 | |
| #endif
 |