Skip to content

Commit e645629

Browse files
Riccardo CipolleschiAndrei Shikov
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 b3f19d7 commit e645629

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

scripts/react_native_pods.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,15 @@ def flipper_post_install(installer)
176176
config.build_settings['SWIFT_VERSION'] = '4.1'
177177
end
178178
end
179+
180+
# Enable flipper for React-Core Debug configuration
181+
if target.name == 'React-Core'
182+
target.build_configurations.each do |config|
183+
if config.name == 'Debug'
184+
config.build_settings['OTHER_CFLAGS'] = "$(inherited) -DFB_SONARKIT_ENABLED=1"
185+
end
186+
end
187+
end
179188
end
180189
end
181190

0 commit comments

Comments
 (0)