Skip to content

Instantly share code, notes, and snippets.

@matteocollina
Created May 8, 2018 15:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matteocollina/fe2a9c3e2a96061ac1a15c0fcf2cbded to your computer and use it in GitHub Desktop.
Save matteocollina/fe2a9c3e2a96061ac1a15c0fcf2cbded to your computer and use it in GitHub Desktop.
Podfile stable ios React Native 0.51.0
# Podfile stable ios React Native 0.51.0 and React 16.0.0
project 'Golee.xcodeproj'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Golee' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'MBProgressHUD'
pod 'LIRequest'
pod 'Reachability'
pod 'KeychainAccess'
pod 'SKPhotoBrowser'
pod 'QRCodeReader.swift'
pod 'AFNetworking'
pod 'Fabric'
pod 'Crashlytics'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBAudienceNetwork'
pod 'GoogleAnalytics'
pod 'AppCenter'
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => 'js/node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # needed for debugging
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => 'js/node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => 'js/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'GLog', :podspec => 'js/node_modules/react-native/third-party-podspecs/GLog.podspec'
pod 'Folly', :podspec => 'js/node_modules/react-native/third-party-podspecs/Folly.podspec'
# Replace bad code in React Native libs
# https://gist.github.com/Jpunt/3fe75effd54a702034b75ff697e47578
def change_lines_in_file(file_path, &change)
print "Fixing #{file_path}...\n"
contents = []
file = File.open(file_path, 'r')
file.each_line do | line |
contents << line
end
file.close
File.open(file_path, 'w') do |f|
f.puts(change.call(contents))
end
end
#https://medium.com/@mspoonam/integrating-react-native-into-ios-native-project-322ddd39792c
change_lines_in_file('./js/node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m') do |lines|
lines.map { |line| line.include?("#import <fishhook/fishhook.h>") ? '#import <React/fishhook.h>' : line }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment