Skip to content

Commit

Permalink
Document podfile hook change
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmartin committed Mar 7, 2021
1 parent dbb5c7c commit 7feb313
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,67 @@ login mapbox
password <INSERT SECRET TOKEN>
```

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
```

<details>
<summary>podfile example</summary>

```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
```

</details>

Now you are ready to install the cocoapod:

```
Expand Down

0 comments on commit 7feb313

Please sign in to comment.