Open arnriu opened 4 years ago
I am using multiple build targets for development, staging and production environments and ran into this issue too.
Because of this line:
Build target gotobridge of project GotoBridge with configuration Debug-dev
I assume you are using multiple build targets, too?
If that is the case, you may have to adapt :configuration => 'Debug'
in your Podfile to your targets.
@blumendorf You are absolutely right. I am using multiple targets and adapting configuration worked. Thank you ! 😊
In my Podfile, my targets:
project 'gotobridge',
'Debug-dev' => :debug,
'Release-dev' => :release,
'Debug' => :debug,
'Release' => :release
And so, my flipper pods :configuration:
def add_flipper_pods!
version = '~> 0.35.0'
pod 'FlipperKit', version, :configuration => ['Debug-dev', 'Release-dev']
pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => ['Debug-dev', 'Release-dev']
pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => ['Debug-dev', 'Release-dev']
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => ['Debug-dev', 'Release-dev']
pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => ['Debug-dev', 'Release-dev']
end
Also, for the record, after I built my app, it crashed on launch with Thread 1: signal SIGABRT
Searching a bit deeper, I found this message: This copy of libswiftCore.dylib requires an OS version prior to 12.2.0.
I added a File.swift in my projects, and it was ok. But if I removed the file again, it crashed again.
So, in xCode, I went to BuildSettings -> Linking -> runpath search path , and manually changed each build line to:
/usr/lib/swift
$(inherited)
And now it builds and starts fine, without the .swift file
I have multiple builds too, but it doesn't work somehow,
here's my PodFile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
project 'projName',
'Debug' => :debug,
'Release' => :release,
'Local.Debug' => :debug,
'Local.Release' => :release,
'Staging.Debug' => :debug,
'Staging.Release' => :release
target 'projName' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'projNameTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'projName-tvOS' do
# Pods for projName-tvOS
target 'projName-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
This is what I am following http://blog.logicwind.com/adding-multiple-target/
I get these errors
For those using multiple schemes and on 0.63
, you can make the following change in your Podfile:
From
use_flipper!
To
use_flipper!(configurations: ['Debug', 'Local.Debug', 'Staging.Debug'])
The flipper pods were made configurable in https://github.com/facebook/react-native/pull/29074
I'm also affected using Xcode Version 12.0.1 (12A7300) (also: Version 12.1 (12A7403)) and running fresh app generated with react-native init
(0.63.3). Xcode 11.7: fresh app works, my app doesn't (same error)
Ok, so I dug further and found that I had -DFB_SONARKIT_ENABLED=1
in OTHER_CFLAGS
somehow in both debug and release. Setting it via preprocessor macros instead only for debug helped. Also https://github.com/react-native-community/upgrade-support/issues/25 might be helpful in case of other problems.
I had the same problem when trying to introduce multiple build targets by following http://blog.logicwind.com/adding-multiple-target/ . I had a lot more :configuration => debug
than what was mentioned by @arnriu in this reply.
I had to change all of them as follows
Before
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
# List all transitive dependencies for FlipperKit pods
# to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end
After adding multiple build targes I changed them to follows and the build worked for all targets
project 'awesomeProject',
'Sandbox.Debug' => :debug,
'Sandbox.Release' => :release,
'Debug' => :debug,
'Release' => :release
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
pod 'FlipperKit', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
# List all transitive dependencies for FlipperKit pods
# to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/Core', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => ['Sandbox.Debug', 'Debug']
end
In my case, i had ejected from expo and had been having issues with Build Settings > Other C Flags > Release
$(inherited)
being at the top. Moved to bottom and build succeeded.
Environment
Upgrading version
0.61.5 -> 0.62
Description
After following upgrade-helper and #13 , I have this error in xcode. I also found this very similare issue in flipper repo, and tryied what they said, but it didn't help: https://github.com/facebook/flipper/issues/816
Undefined symbol: _OBJC_CLASS_$_FlipperKitNetworkPlugin
Undefined symbol: _OBJC_CLASS_$_SKIOSNetworkAdapter
Undefined symbol: _OBJC_CLASS_$_FlipperKitReactPlugin
Undefined symbol: _OBJC_CLASS_$_FKUserDefaultsPlugin
Undefined symbol: _OBJC_CLASS_$_FlipperKitLayoutPlugin
Undefined symbol: _OBJC_CLASS_$_SKDescriptorMapper
Undefined symbol: _OBJC_CLASS_$_FlipperClient
Transcript of first one:
Reproducible demo
n/a