react-native-compdfkit-pdf.podspec 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. require "json"
  2. package = JSON.parse(File.read(File.join(__dir__, "package.json")))
  3. folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
  4. Pod::Spec.new do |s|
  5. s.name = "react-native-compdfkit-pdf"
  6. s.version = package["version"]
  7. s.summary = package["description"]
  8. s.homepage = package["homepage"]
  9. s.license = package["license"]
  10. s.authors = package["author"]
  11. s.platforms = { :ios => "11.0" }
  12. s.source = { :git => "https://github.com/ComPDFKit/compdfkit-pdf-sdk-react-native.git", :tag => "#{s.version}" }
  13. s.source_files = "ios/**/*.{h,m,mm,swift}"
  14. s.dependency "ComPDFKit"
  15. s.dependency "ComPDFKit_Tools"
  16. # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
  17. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
  18. if respond_to?(:install_modules_dependencies, true)
  19. install_modules_dependencies(s)
  20. else
  21. s.dependency "React-Core"
  22. # Don't install the dependencies when we run `pod install` in the old architecture.
  23. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
  24. s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
  25. s.pod_target_xcconfig = {
  26. "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
  27. "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
  28. "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
  29. }
  30. s.dependency "React-Codegen"
  31. s.dependency "RCT-Folly"
  32. s.dependency "RCTRequired"
  33. s.dependency "RCTTypeSafety"
  34. s.dependency "ReactCommon/turbomodule/core"
  35. end
  36. end
  37. end