Podfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 'CompdfkitPdfExample' do
  25. config = use_native_modules!
  26. pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.0.1.podspec'
  27. pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.0.1.podspec'
  28. use_react_native!(
  29. :path => config[:reactNativePath],
  30. # Enables Flipper.
  31. #
  32. # Note that if you have use_frameworks! enabled, Flipper will not work and
  33. # you should disable the next line.
  34. :flipper_configuration => flipper_config,
  35. # An absolute path to your application root.
  36. :app_path => "#{Pod::Config.instance.installation_root}/.."
  37. )
  38. target 'CompdfkitPdfExampleTests' do
  39. inherit! :complete
  40. # Pods for testing
  41. end
  42. post_install do |installer|
  43. # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
  44. react_native_post_install(
  45. installer,
  46. config[:reactNativePath],
  47. :mac_catalyst_enabled => false
  48. )
  49. end
  50. end