Git Product home page Git Product logo

Comments (6)

EmpireJones avatar EmpireJones commented on May 20, 2024 14

I was getting that error, and this fixed it for me: #30 (comment)

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

from upgrade-support.

hbarylskyi avatar hbarylskyi commented on May 20, 2024 10

Had the same issue and only adding /usr/lib/swift to Runpath Search Paths helped.

https://stackoverflow.com/a/69852407/4896751

from upgrade-support.

yj-ang avatar yj-ang commented on May 20, 2024 5

Add @executable_path/Frameworks at Runpath Search Paths worked for me.

https://stackoverflow.com/a/57669947/6162478

from upgrade-support.

palkerecsenyi avatar palkerecsenyi commented on May 20, 2024 1

If anyone happens to have this (or a similar) issue, and you don't need Flipper support for your app, disabling Flipper solves the issue.

Comment out these lines from Podfile:

add_flipper_pods!
post_install do |installer|
  flipper_post_install(installer)
end

And from AppDelegate.m:

#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

// ...
#if DEBUG
  InitializeFlipper(application);
#endif

I know this fix isn't really a fix at all, but if you want the other new features/bug fixes in 0.62 and are okay without Flipper, you can disable it altogether on iOS fairly easily.

from upgrade-support.

nataliepan avatar nataliepan commented on May 20, 2024

Took me hours to figure this out but I had to manually add Flipper to my Podfile, since I could not run react-native update on my project. I noticed I wasn't getting all these extra Flipper pod files compared to a new project.
https://fbflipper.com/docs/getting-started/react-native-ios

platform :ios, '9.0'

def flipper_pods()
  flipperkit_version = '0.49.0'
  pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
end

# Post Install processing for Flipper
def flipper_post_install(installer)
  file_name = Dir.glob("*.xcodeproj")[0]
  app_project = Xcodeproj::Project.open(file_name)
  app_project.native_targets.each do |target|
    target.build_configurations.each do |config|
      cflags = config.build_settings['OTHER_CFLAGS'] || '$(inherited) '
      unless cflags.include? '-DFB_SONARKIT_ENABLED=1'
        puts 'Adding -DFB_SONARKIT_ENABLED=1 in OTHER_CFLAGS...'
        cflags << '-DFB_SONARKIT_ENABLED=1'
      end
      config.build_settings['OTHER_CFLAGS'] = cflags
    end
    app_project.save
  end
  installer.pods_project.save
end

target 'your-app-name' do
  ...


  # Replace the existing yoga import with the following (adding modular_headers):
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true

  ...
  use_native_modules!

  # For enabling Flipper.
  # Note that if you use_framework!, flipper will not work.
  # Disable these lines if you are doing use_framework!
  flipper_pods()
  post_install do |installer|
    flipper_post_install(installer)
  end
end

from upgrade-support.

gndelia avatar gndelia commented on May 20, 2024

I had the same issue here, I tried tons of solutions in Stack Overflow (such as the one linked above this comment ☝🏽 ) but the only thing that managed to remove this error was disabling flipper 😞

from upgrade-support.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.