Skip to content

Commit b5343a6

Browse files
Riccardo Cipolleschifacebook-github-bot
Riccardo Cipolleschi
authored andcommitted
Enable SonarKit and Flipper in React-Core (#33499)
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
1 parent 9aab25e commit b5343a6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/react_native_pods.rb

+9
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,15 @@ def flipper_post_install(installer)
191191
config.build_settings['SWIFT_VERSION'] = '4.1'
192192
end
193193
end
194+
195+
# Enable flipper for React-Core Debug configuration
196+
if target.name == 'React-Core'
197+
target.build_configurations.each do |config|
198+
if config.name == 'Debug'
199+
config.build_settings['OTHER_CFLAGS'] = "$(inherited) -DFB_SONARKIT_ENABLED=1"
200+
end
201+
end
202+
end
194203
end
195204
end
196205

0 commit comments

Comments
 (0)