Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Podfile: fix bug RNSVG lib (SVG, QRCode)
##
# package.json:
# "react": "16.6.1",
# "react-native": "0.57.4",
# "react-native-qrcode-svg": "^5.1.1",
# "react-native-svg": "^8.0.10",
# 1) rm -rf node_modules/
# 2) yarn cache clean
# 3) yarn install
# 4) cd ios
# 5) rm -rf Pods/
# 6) pod install
# 7) re-open project on Xcode.. wait indexing and build (if it gives error, rebuild). ggwp
##
# PODFILE
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Frajola' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
rn_path = '../node_modules/react-native'
# Pods for Frajola
pod 'Firebase/Core'
pod 'React', :path => '../node_modules/react-native'
pod 'React', path: rn_path, subspecs: [
'RCTImage',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
target 'FrajolaTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
if target.name == "React"
target.remove_from_project
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment