| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  | require "json" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-24 16:16:45 +02:00
										 |  |  | nodeModules = File.join(File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native/package.json')"`), '..') | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | forceDisableFrameProcessors = false | 
					
						
							|  |  |  | if defined?($VCDisableFrameProcessors) | 
					
						
							|  |  |  |   Pod::UI.puts "[VisionCamera] $VCDisableFrameProcesors is set to #{$VCDisableFrameProcessors}!" | 
					
						
							|  |  |  |   forceDisableFrameProcessors = $VCDisableFrameProcessors | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Pod::UI.puts("[VisionCamera] node modules #{Dir.exist?(nodeModules) ? "found at #{nodeModules}" : "not found!"}") | 
					
						
							| 
									
										
										
										
											2023-08-21 12:50:14 +02:00
										 |  |  | workletsPath = File.join(nodeModules, "react-native-worklets-core") | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | hasWorklets = File.exist?(workletsPath) && !forceDisableFrameProcessors | 
					
						
							| 
									
										
										
										
											2023-08-21 12:50:14 +02:00
										 |  |  | Pod::UI.puts("[VisionCamera] react-native-worklets-core #{hasWorklets ? "found" : "not found"}, Frame Processors #{hasWorklets ? "enabled" : "disabled"}!") | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  | Pod::Spec.new do |s| | 
					
						
							| 
									
										
										
										
											2021-03-26 16:22:24 +01:00
										 |  |  |   s.name         = "VisionCamera" | 
					
						
							| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  |   s.version      = package["version"] | 
					
						
							|  |  |  |   s.summary      = package["description"] | 
					
						
							| 
									
										
										
										
											2023-07-03 13:37:43 +02:00
										 |  |  |   s.description  = package["description"] | 
					
						
							| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  |   s.homepage     = package["homepage"] | 
					
						
							|  |  |  |   s.license      = package["license"] | 
					
						
							|  |  |  |   s.authors      = package["author"] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-31 18:21:55 +02:00
										 |  |  |   s.platforms    = { :ios => "12.4" } | 
					
						
							| 
									
										
										
										
											2021-06-21 22:42:46 +02:00
										 |  |  |   s.source       = { :git => "https://github.com/mrousavy/react-native-vision-camera.git", :tag => "#{s.version}" } | 
					
						
							| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-06 14:11:55 +02:00
										 |  |  |   s.pod_target_xcconfig = { | 
					
						
							| 
									
										
										
										
											2023-09-01 12:20:17 +02:00
										 |  |  |     "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) SK_METAL=1 SK_GANESH=1 VISION_CAMERA_ENABLE_FRAME_PROCESSORS=#{hasWorklets}", | 
					
						
							|  |  |  |     "OTHER_SWIFT_FLAGS" => "$(inherited) #{hasWorklets ? "-D VISION_CAMERA_ENABLE_FRAME_PROCESSORS" : ""}", | 
					
						
							| 
									
										
										
										
											2022-10-31 08:04:07 -04:00
										 |  |  |     "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", | 
					
						
							| 
									
										
										
										
											2023-09-01 12:20:17 +02:00
										 |  |  |     "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/cpp/\"/** " | 
					
						
							| 
									
										
										
										
											2021-10-13 15:18:11 +02:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-06 14:11:55 +02:00
										 |  |  |   s.requires_arc = true | 
					
						
							| 
									
										
										
										
											2021-02-19 16:59:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-06 14:11:55 +02:00
										 |  |  |   # All source files that should be publicly visible | 
					
						
							|  |  |  |   # Note how this does not include headers, since those can nameclash. | 
					
						
							|  |  |  |   s.source_files = [ | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  |     # Core | 
					
						
							|  |  |  |     "ios/*.{m,mm,swift}", | 
					
						
							|  |  |  |     "ios/Extensions/*.{m,mm,swift}", | 
					
						
							|  |  |  |     "ios/Parsers/*.{m,mm,swift}", | 
					
						
							|  |  |  |     "ios/React Utils/*.{m,mm,swift}", | 
					
						
							| 
									
										
										
										
											2023-09-23 10:14:27 +02:00
										 |  |  |     "ios/Types/*.{m,mm,swift}", | 
					
						
							| 
									
										
										
										
											2021-05-06 14:11:55 +02:00
										 |  |  |     "ios/CameraBridge.h", | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Frame Processors | 
					
						
							|  |  |  |     hasWorklets ? "ios/Frame Processor/*.{m,mm,swift}" : "", | 
					
						
							|  |  |  |     hasWorklets ? "ios/Frame Processor/Frame.h" : "", | 
					
						
							|  |  |  |     hasWorklets ? "ios/Frame Processor/FrameProcessor.h" : "", | 
					
						
							|  |  |  |     hasWorklets ? "ios/Frame Processor/FrameProcessorPlugin.h" : "", | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  |     hasWorklets ? "ios/Frame Processor/FrameProcessorPluginRegistry.h" : "", | 
					
						
							|  |  |  |     hasWorklets ? "ios/Frame Processor/VisionCameraProxy.h" : "", | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  |     hasWorklets ? "cpp/**/*.{cpp}" : "", | 
					
						
							| 
									
										
										
										
											2021-05-06 14:11:55 +02:00
										 |  |  |   ] | 
					
						
							|  |  |  |   # Any private headers that are not globally unique should be mentioned here. | 
					
						
							|  |  |  |   # Otherwise there will be a nameclash, since CocoaPods flattens out any header directories | 
					
						
							|  |  |  |   # See https://github.com/firebase/firebase-ios-sdk/issues/4035 for more details. | 
					
						
							|  |  |  |   s.preserve_paths = [ | 
					
						
							|  |  |  |     "cpp/**/*.h", | 
					
						
							|  |  |  |     "ios/**/*.h" | 
					
						
							|  |  |  |   ] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   s.dependency "React" | 
					
						
							| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  |   s.dependency "React-Core" | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  |   s.dependency "React-callinvoker" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if hasWorklets | 
					
						
							| 
									
										
										
										
											2023-08-21 12:50:14 +02:00
										 |  |  |     s.dependency "react-native-worklets-core" | 
					
						
							| 
									
										
										
										
											2023-07-20 15:30:04 +02:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2021-02-19 16:07:53 +01:00
										 |  |  | end |