Podfile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Resolve react_native_pods.rb with node to allow for hoisting
  2. require Pod::Executable.execute_command('node', ['-p',
  3. 'require.resolve(
  4. "react-native/scripts/react_native_pods.rb",
  5. {paths: [process.argv[1]]},
  6. )', __dir__]).strip
  7. platform :ios, min_ios_version_supported
  8. prepare_react_native_project!
  9. # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
  10. # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
  11. #
  12. # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
  13. # ```js
  14. # module.exports = {
  15. # dependencies: {
  16. # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
  17. # ```
  18. flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
  19. linkage = ENV['USE_FRAMEWORKS']
  20. if linkage != nil
  21. Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  22. use_frameworks! :linkage => linkage.to_sym
  23. end
  24. target 'ComPDFKit_RN' do
  25. config = use_native_modules!
  26. # Flags change depending on the env values.
  27. flags = get_default_flags()
  28. pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.11.0.podspec'
  29. pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.11.0.podspec'
  30. use_react_native!(
  31. :path => config[:reactNativePath],
  32. # Hermes is now enabled by default. Disable by setting this flag to false.
  33. :hermes_enabled => flags[:hermes_enabled],
  34. :fabric_enabled => flags[:fabric_enabled],
  35. # Enables Flipper.
  36. #
  37. # Note that if you have use_frameworks! enabled, Flipper will not work and
  38. # you should disable the next line.
  39. :flipper_configuration => flipper_config,
  40. # An absolute path to your application root.
  41. :app_path => "#{Pod::Config.instance.installation_root}/.."
  42. )
  43. target 'ComPDFKit_RNTests' do
  44. inherit! :complete
  45. # Pods for testing
  46. end
  47. post_install do |installer|
  48. # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
  49. react_native_post_install(
  50. installer,
  51. config[:reactNativePath],
  52. :mac_catalyst_enabled => false
  53. )
  54. __apply_Xcode_12_5_M1_post_install_workaround(installer)
  55. end
  56. end