pod 踩坑记 太南了

2019-10-12  本文已影响0人  扯扯疯

1, 控制台 再ios下pod install 后 Xcode报'folly/Portability.h' file not found

image.png
解决方案:
image.png
code:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'newapp' do

  rn_path = '../node_modules/react-native'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/yoga.podspec'
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    # 'BatchedBridge', # 0.45 版本以后需要添加
    'RCTText',
    'RCTImage', #这个库主要是为了使用<Image>标签
    'DevSupport',
    'RCTAnimation', #如果不加入这个的话在使用<TouchableOpacity>等触摸事件的时候会出现告警
    'RCTNetwork',
    'RCTWebSocket', # 这个模块是用于调试功能的
  
    # 在这里继续添加你所需要的模块
    ]

    # pod 'react-native-amap-geolocation', :path => '../node_modules/react-native-amap-geolocation/lib/ios/react-native-amap-geolocation.podspec'

    pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"


    post_install do |installer|
      installer.pods_project.targets.each do |target|
        if target.name == "React"
          target.remove_from_project
        end
      end
    end
  
end
上一篇 下一篇

猜你喜欢

热点阅读