JivoChat / JivoSDK-iOS

The Jivo Mobile SDK allows you to embed the Jivo chat into your iOS mobile applications to receive customer requests
https://www.jivochat.com
Apache License 2.0
8 stars 5 forks source link

RN 0.71.3 crashing immediately on start up [DYLD 4 Symbol missing] #6

Open jedi2209 opened 1 year ago

jedi2209 commented 1 year ago
Termination Reason: DYLD 4 Symbol missing
Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
Referenced from: <F45BE332-04DD-3A6B-B284-8AAF159E235F> /Users/USER/Library/Developer/CoreSimulator/Devices/1F49B70D-B245-49D9-BEDD-DF7D3C9F3165/data/Containers/Bundle/Application/B32AEC70-CF8D-418D-A046-15B67F69CE93/XXXXX.app/Frameworks/JivoSDK.framework/JivoSDK
Expected in:     <284185E2-94D4-3AC9-B3A2-7707F0F357F3> /Users/USER/Library/Developer/CoreSimulator/Devices/1F49B70D-B245-49D9-BEDD-DF7D3C9F3165/data/Containers/Bundle/Application/B32AEC70-CF8D-418D-A046-15B67F69CE93/XXXXX.app/Frameworks/CollectionAndTableViewCompatible.framework/CollectionAndTableViewCompatible

Содержимое для podfile взято уже обновлённое из #2

Podfile ``` require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/JivoChat/JMSpecsRepo.git' plugin 'cocoapods-user-defined-build-types' enable_user_defined_build_types! platform :ios, '13.0' prepare_react_native_project! $RNFirebaseAsStaticFramework = true flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled(["Debug", "Release"], {'Flipper' => '0.163.0'}) linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym end target 'XXXXX' do config = use_native_modules! # Flags change depending on the env values. flags = get_default_flags() use_react_native!( :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. # Upcoming versions of React Native may rely on get_default_flags(), but # we make it explicit here to aid in the React Native upgrade process. :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) pod 'Firebase', :modular_headers => true pod 'FirebaseCore', :modular_headers => true pod 'FBSDKCoreKit', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true pod 'react-native-google-maps', :path => '../node_modules/react-native-maps' pod 'GoogleMaps' pod 'Google-Maps-iOS-Utils' pod 'GoogleSignIn', '~> 6.2.2' pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0' pod 'JivoSDK', '~> 3.0', :build_type => :dynamic_framework target 'XXXXXTests' do inherit! :complete # Pods for testing end post_install do |installer| react_native_post_install( installer, # Set `mac_catalyst_enabled` to `true` in order to apply patches # necessary for Mac Catalyst builds :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end JivoPatcher.new(installer).patch() end class JivoPatcher def initialize(installer) @sdkname = "JivoSDK" @installer = installer end def patch() libnames = collectLibNames() @installer.pods_project.targets.each do |target| if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' end end target.build_configurations.each do |config| if libnames.include? target.to_s config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' config.build_settings['GENERATE_INFOPLIST_FILE'] = 'YES' end end end end private def collectLibNames() depnames = Array.new @installer.pod_targets.each do |target| next if target.to_s != @sdkname depnames = collectTargetLibNames(target) end return depnames.uniq() end private def collectTargetLibNames(target) depnames = [target.to_s] target.dependent_targets.each do |subtarget| depnames += [subtarget.to_s] + collectTargetLibNames(subtarget) end return depnames end end end target 'OneSignalNotificationServiceExtension' do pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0' end ```
yarn react-native info ``` System: OS: macOS 12.5.1 CPU: (10) arm64 Apple M1 Max Memory: 505.27 MB / 64.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.14.0 - /var/folders/14/w5h7fyhn7y5_qvtb_lk90hw80000gn/T/yarn--1681256492410-0.4449614873511616/node Yarn: 1.22.19 - /var/folders/14/w5h7fyhn7y5_qvtb_lk90hw80000gn/T/yarn--1681256492410-0.4449614873511616/yarn npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm Watchman: 2023.01.30.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/XXXX/.gem/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: API Levels: 28, 29, 30, 31, 33 Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0 System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-31 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9514443 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /opt/homebrew/opt/openjdk@11/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.3 => 0.71.3 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found ```

Пока непонятно куда копать вообще, это первая итерация по интеграции JivoSDK в существующий react-native проект.

bronenos commented 4 months ago

В актуальных версиях проблема не должна воспроизводиться