Skip to content

Commit

Permalink
Enable SonarKit and Flipper in React-Core (#33499)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #33499

This DIFF turns on the `FB_SONARKIT_ENABLED` flag when installing Flipper ina RN app. The flag is enabled only in Debug config, given that Flipper is installed only in this configuration.

This PR also fixes this issue: #33497

This PR is required because release 0.67 has the Flag in the app, while release 0.68 moved it in the React-Core pod.
We can't enable the flag at the `React-Core.podspec` level because we should not make assumptions on whether users want flipper or not.

## Changelog
[iOS][Changed] - Enable SonarKit in React-Core when the configuration is `'Debug'`

Reviewed By: cortinico

Differential Revision: D35141506

fbshipit-source-id: 171b7fa8ea7727c633ef963408e86b332c32e9fa
  • Loading branch information
Riccardo Cipolleschi authored and facebook-github-bot committed Mar 25, 2022
1 parent 9aab25e commit b5343a6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ def flipper_post_install(installer)
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end

# Enable flipper for React-Core Debug configuration
if target.name == 'React-Core'
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['OTHER_CFLAGS'] = "$(inherited) -DFB_SONARKIT_ENABLED=1"
end
end
end
end
end

Expand Down

0 comments on commit b5343a6

Please sign in to comment.