Skip to content

Commit

Permalink
fix(ios): update Fabric in Podfile instructions (#2973)
Browse files Browse the repository at this point in the history
* fix(ios): update Fabric in Podfile instructions

* move fabric_enabled comment closer to the property
  • Loading branch information
tido64 authored Feb 21, 2022
1 parent f60b807 commit ebc1bdc
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions docs/new-architecture-app-renderer-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,20 @@ target 'Some App' do
end

def pods()
# Get config
config = use_native_modules!

# Use env variables to turn it on/off.
fabric_enabled = ENV['USE_FABRIC']
use_codegen_discovery= ENV['USE_CODEGEN_DISCOVERY']

# Enabled codegen discovery. This will run the codegen at preinstall time.
# Files are generated at {pod installation root}/build/generated/ios/
if use_codegen_discovery
Pod::UI.puts "[Codegen] Building target with codegen library discovery enabled."
pre_install do |installer|
use_react_native_codegen_discovery!({
react_native_path: config[:reactNativePath],
# Modify here if your app root path isn't the same as this one.
app_path: "#{Dir.pwd}/..",
fabric_enabled: fabric_enabled,
})
end
# Get config
config = use_native_modules!

# Use env variables to turn it on/off.
fabric_enabled = ENV['USE_FABRIC']

use_react_native!(
...
# Modify here if your app root path isn't the same as this one.
:app_path => "#{Dir.pwd}/..",
# Pass the flag to enable fabric to use_react_native!.
:fabric_enabled => fabric_enabled
)
end

# Pass the flag to enable fabric to use_react_native!.
use_react_native!(
...
:fabric_enabled => fabric_enabled
)
```

## 2. Update your root view
Expand Down

0 comments on commit ebc1bdc

Please sign in to comment.