1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #
- # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
- # Run `pod lib lint native_vision.podspec` to validate before publishing.
- #
- Pod::Spec.new do |s|
- s.name = 'native_vision'
- s.version = '0.0.5'
- s.summary = 'A new Flutter plugin project.'
- s.description = <<-DESC
- A new Flutter plugin project.
- DESC
- s.homepage = 'http://example.com'
- s.license = { :file => '../LICENSE' }
- s.author = { 'Your Company' => 'email@example.com' }
- s.source = { :path => '.' }
- s.source_files = 'Classes/**/*', 'cross_plat_cpp/**/*.{h,hpp,cpp,c}'
- s.private_header_files = 'Classes/**/*.hpp', 'cross_plat_cpp/**/*.{hpp,h}'
- s.dependency 'Flutter'
- s.platform = :ios, '9.0'
- s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
- # Flutter.framework does not contain a i386 slice.
- s.pod_target_xcconfig = {
- 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64',
- }
- # s.module_map = false
- s.swift_version = '5.0'
- # s.subspec 'Torch' do |ss|
- ## https://medium.com/@khaifunglim97/how-to-build-a-flutter-app-with-c-c-libraries-via-ffi-on-android-and-ios-including-opencv-1e2124e85019
- ## Fixed the issue that does not find the headers when use_framework is enabled in above link.
- ## https://github.com/pytorch/pytorch/issues/49406#issuecomment-1169210337 The torch lib with bitcode enable.
- # ss.ios.vendored_libraries = 'Torch/lib/*.a'
- # ss.resources = 'Torch'
- # ss.xcconfig = {
- # 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/Torch/include" "${PODS_TARGET_SRCROOT}/TorchLite/include/torch/csrc/api/include"',
- # 'GCC_PREPROCESSOR_DEFINITIONS' => 'IOS_METAL=1'
- # }
- ## https://github.com/CocoaPods/CocoaPods/issues/10104#issuecomment-701212173 only for arm64 arch.
- # ss.pod_target_xcconfig = {
- # 'VALID_ARCHS' => 'arm64',
- # 'OTHER_LDFLAGS' => '$(inherited) -Objc -all_load', # The linker has a bug that does not load static lib
- # 'ENABLE_BITCODE' => 'NO'
- # }
- # ss.frameworks = 'Accelerate', 'MetalPerformanceShaders', 'CoreML'
- # end
- # s.subspec 'TorchLite' do |ss|
- ## https://medium.com/@khaifunglim97/how-to-build-a-flutter-app-with-c-c-libraries-via-ffi-on-android-and-ios-including-opencv-1e2124e85019
- ## Fixed the issue that does not find the headers when use_framework is enabled in above link.
- ## https://github.com/pytorch/pytorch/issues/49406#issuecomment-1169210337 The torch lib with bitcode enable.
- # ss.ios.vendored_libraries = 'TorchLite/lib/*.a'
- # ss.resources = 'TorchLite'
- # ss.xcconfig = {
- # 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/TorchLite/include" "${PODS_TARGET_SRCROOT}/TorchLite/include/torch/csrc/api/include"'
- # }
- ## https://github.com/CocoaPods/CocoaPods/issues/10104#issuecomment-701212173 only for arm64 arch.
- # ss.pod_target_xcconfig = {
- # 'OTHER_LDFLAGS' => '-all_load' # The linker has a bug that does not load static lib
- # }
- # end
- s.libraries = ['c++', 'stdc++']
- s.ios.vendored_frameworks = "opencv2.framework"
-
- # tflite debug
- # s.subspec 'tflite_debug' do |ss|
- # ss.ios.vendored_frameworks = "tflite_framework_debug/TensorFlowLiteC.framework", "tflite_framework_debug/TensorFlowLiteCMetal.framework"
- # ss.xcconfig = {
- # 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/tflite_framework_debug/TensorFlowLiteC.framework/Headers" "${PODS_TARGET_SRCROOT}/tflite_framework_debug/TensorFlowLiteCMetal.framework/Headers"'
- # }
- # end
-
- s.xcconfig = {
- 'HEADER_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}/cross_plat_cpp"'
- }
-
- s.subspec 'tflite_release' do |ss|
- ss.ios.vendored_frameworks = "tflite_framework_release/TensorFlowLiteC.framework", "tflite_framework_release/TensorFlowLiteCMetal.framework"
- ss.xcconfig = {
- 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/tflite_framework_release/TensorFlowLiteC.framework/Headers" "${PODS_TARGET_SRCROOT}/tflite_framework_release/TensorFlowLiteCMetal.framework/Headers"'
- }
- end
- end
|