reactjs – React Native iOS Construct Failed: fmt/src/format.cc compilation error after downloading Pod file

0
1
reactjs – React Native iOS Construct Failed: fmt/src/format.cc compilation error after downloading Pod file


I’m engaged on a React Native mission, and after efficiently downloading the Pod file, I’m going through a construct failure when working the app on iOS. Right here’s what occurs:

  1. I run the next command to start out the app:

  2. rm -rf ios/Pods
    rm -rf ios/DerivedData
    rm -rf ~/Library/Developer/Xcode/DerivedData
    cd ios && pod set up --repo-update && cd ..se64
    
  3. "ios:dev": "npx react-native run-ios --scheme 'VeeraHealthPcosDev' --configuration Debug --simulator="iPhone 13"" 
    
  4. The construct fails, and I get this error message:

    ** BUILD FAILED **
    
    
    The next construct instructions failed:
            CompileC /Customers/rac/Library/Developer/Xcode/DerivedData/veerahealthpcos-fjsocvigquxpakdaumsxcfhhcmhw/Construct/Intermediates.noindex/Pods.construct/Debug-iphonesimulator/fmt.construct/Objects-normal/x86_64/format.o /Customers/rac/Desktop/working/rn-veera-health-pcos/ios/Pods/fmt/src/format.cc regular x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in goal 'fmt' from mission 'Pods')
            Constructing workspace veerahealthpcos with scheme VeeraHealthPcosDev and configuration Debug
    (2 failures)
    
    data Run CLI with --verbose flag for extra particulars.
    

Atmosphere:

I can’t replace to the most recent model of React Native, as my mission is dependent upon older package deal variations that aren’t appropriate with the most recent React Native model. I’ve tried cleansing the construct folder, reinstalling the dependencies, and even updating the Pods, however the difficulty persists.

I believe the issue could also be associated to the file ios/Pods/fmt/src/format.cc, however I’m unsure the way to resolve it. Has anybody else encountered this difficulty or have any strategies for an answer?

Contained in the post_install do |installer| block, I added the next to change the construct settings:

installer.pods_project.targets.every do |goal|
  goal.build_configurations.every do |config|
    # Enable arm64 (take away earlier exclusion of arm64):
    config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
    config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
  finish
finish

installer.pods_project.targets.every do |goal|
  if goal.title == 'fmt'
    goal.build_configurations.every do |config|
      # Pressure C++17 (required by trendy fmt) and libc++  
      config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'  
      config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'  
      # Disable Clang modules (can keep away from module import points)
      config.build_settings['CLANG_ENABLE_MODULES'] = 'NO'  
      config.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'  
      # (Non-obligatory) Add any wanted defines, e.g. for compatibility
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
    finish
  finish
finish

installer.pods_project.targets.every do |goal|
  if goal.title == 'OneSignalNotificationServiceExtension'
    goal.build_configurations.every do |config|
      # Exclude x86_64 on simulator so we solely construct arm64
      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
      # Solely construct the energetic arch in debug
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
    finish
  finish
finish

After working the app, I anticipated the construct to succeed, however as an alternative, I acquired the next error:

The next construct instructions failed:
        SwiftEmitModule regular x86_64 Emitting module for OneSignalNotificationServiceExtension (in goal 'OneSignalNotificationServiceExtension' from mission 'xyz')
        SwiftCompile regular x86_64 /Customers/rac/Desktop/working/rn-veera-health-pcos/ios/OneSignalNotificationServiceExtension/NotificationService.swift (in goal 'OneSignalNotificationServiceExtension' from mission 'xyz')
        Constructing workspace xyz with scheme VeeraHealthPcosDev and configuration Debug
(3 failures)

It seems to be a problem associated to the OneSignalNotificationServiceExtension. Any strategies on the way to resolve this or repair the construct failure could be appreciated.

LEAVE A REPLY

Please enter your comment!
Please enter your name here