【问题标题】:react-native iOS new scheme error: Undefined symbol: _OBJC_CLASS_$_FlipperClientreact-native iOS新方案错误:未定义符号:_OBJC_CLASS_$_FlipperClient
【发布时间】:2022-01-06 15:53:39
【问题描述】:
我在 xcode 中的 react-native 项目中添加了一个新的构建配置 Dev.Debug,复制了现有的 Debug 配置,并且还为新配置添加了相应的方案。
现在,当我尝试使用新方案运行项目时,出现错误:
Undefined symbol: _OBJC_CLASS_$_FlipperClient
运行我复制的方案可以正常运行 - 应用安装、启动和运行正常。
添加新的调试方案后是否需要更多配置?
【问题讨论】:
标签:
ios
xcode
react-native
flipper
【解决方案1】:
我发现我需要修改我的podfile如下:
...
target 'MyApp' do
config = use_native_modules!
# Add the project and build configurations
project 'MyApp',
'Dev.Debug' => :debug, # '{Build Configuration name}' => :{debug or release}
'Debug' => :debug,
'Dev.Release' => :release,
'Release' => :release
...
use_flipper!({'Flipper' => '0.126.0', configurations: ['Debug', 'Dev.Debug']}) # Add the Build Configuration name (not scheme name)
...