Podfile 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. require_relative '../node_modules/react-native/scripts/react_native_pods'
  2. require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
  3. platform :ios, '12.0'
  4. target 'JuicePlus' do
  5. config = use_native_modules!
  6. pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
  7. #pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  8. permissions_path = '../node_modules/react-native-permissions/ios'
  9. pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency" #访问设备的广告标识符
  10. #pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral" #访问蓝牙
  11. #pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars" #访问日历
  12. pod 'Permission-Camera', :path => "#{permissions_path}/Camera" #访问相机
  13. #pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts" #访问联系人
  14. #pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID" #访问FaceID
  15. pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy" #访问高明度定位
  16. pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways" #始终访问位置信息
  17. pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse" #在使用中访问位置信息
  18. #pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary" #使用媒体库
  19. pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone" #使用麦克风
  20. #pod 'Permission-Motion', :path => "#{permissions_path}/Motion" #运动权限
  21. pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications" #使用通知
  22. pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary" #使用照片库
  23. pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly" #添加照片
  24. #pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders"
  25. #pod 'Permission-Siri', :path => "#{permissions_path}/Siri"
  26. #pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition"
  27. #pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit"
  28. #谷歌通知启用
  29. pod 'Firebase/Core', :modular_headers => true
  30. pod 'Firebase/Analytics', :modular_headers => true
  31. pod 'Firebase/Messaging', :modular_headers => true
  32. pod 'FirebaseCoreInternal', :modular_headers => true
  33. pod 'GoogleUtilities', :modular_headers => true
  34. #微软热更新
  35. pod 'CodePush', :path => '../node_modules/react-native-code-push'
  36. use_react_native!(
  37. :path => config[:reactNativePath],
  38. # to enable hermes on iOS, change `false` to `true` and then install pods
  39. :hermes_enabled => false
  40. )
  41. target 'JuicePlusTests' do
  42. inherit! :complete
  43. # Pods for testing
  44. end
  45. # Enables Flipper.
  46. #
  47. # Note that if you have use_frameworks! enabled, Flipper will not work and
  48. # you should disable the next line.
  49. #use_flipper!()
  50. #use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
  51. #post_install do |installer|
  52. # react_native_post_install(installer)
  53. #end
  54. #⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄修复iOS 14.5新建RN0.64无法运行⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
  55. def find_and_replace(dir, findstr, replacestr)
  56. Dir[dir].each do |name|
  57. text = File.read(name)
  58. replace = text.gsub(findstr,replacestr)
  59. if text != replace
  60. puts "Fix: " + name
  61. File.open(name, "w") { |file| file.puts replace }
  62. STDOUT.flush
  63. end
  64. end
  65. Dir[dir + '*/'].each(&method(:find_and_replace))
  66. end
  67. post_install do |installer|
  68. flipper_post_install(installer)
  69. find_and_replace("Pods/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h",
  70. "atomic_notify_one(state)", "folly::atomic_notify_one(state)")
  71. find_and_replace("Pods/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h",
  72. "atomic_wait_until(&state, previous | data, deadline)", "folly::atomic_wait_until(&state, previous | data, deadline)")
  73. installer.pods_project.targets.each do |target|
  74. target.build_configurations.each do |config|
  75. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' #将所有插件更新为iOS12可用
  76. end
  77. end
  78. end
  79. #⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃修复iOS 14.5新建RN0.64无法运行⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃
  80. end