From 7feb313b1b934b8055a7ab02d0cfb0d945d85de7 Mon Sep 17 00:00:00 2001 From: Ross Martin Date: Sun, 7 Mar 2021 10:59:38 -0600 Subject: [PATCH] Document podfile hook change --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/README.md b/README.md index 176f738b..3e5fac15 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,67 @@ login mapbox password ``` +Add the following to your ios podfile - + +```ruby + pre_install do |installer| + $RNMBNAV.pre_install(installer) + # any other pre install hooks here + end + + post_install do |installer| + $RNMBNAV.post_install(installer) + # any other post install hooks here + end +``` + +
+podfile example + +```ruby +require_relative '../node_modules/react-native/scripts/react_native_pods' +require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' + +platform :ios, '10.0' +install! 'cocoapods', :disable_input_output_paths => true + +target 'AwesomeProject' do + config = use_native_modules! + + use_react_native!(:path => config["reactNativePath"]) + + target 'AwesomeProjectTests' do + inherit! :complete + # Pods for testing + end + + pre_install do |installer| + $RNMBNAV.pre_install(installer) + end + + # Enables Flipper. + # + # Note that if you have use_frameworks! enabled, Flipper will not work and + # you should disable these next few lines. + use_flipper! + post_install do |installer| + flipper_post_install(installer) + $RNMBNAV.post_install(installer) + end +end + +target 'AwesomeProject-tvOS' do + # Pods for AwesomeProject-tvOS + + target 'AwesomeProject-tvOSTests' do + inherit! :search_paths + # Pods for testing + end +end +``` + +
+ Now you are ready to install the cocoapod: ```