question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flipper & RN 0.62 - Build Failed: Use of undeclared identifier 'client'

See original GitHub issue

Description

After upgrading to RN 0.62, I’m not able to build the app due to Flipper error in AppDelegate.m

image

I’m not actually sure what exactly is happening - I’m able to ‘jump to definition’ to every flipper file. Pods seems to be installed properly (I’m using the same pods as defined inside RN Podfile for 0.62 + my native dependencies

React Native version:

System:
    OS: macOS 10.15.3
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.60 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.5.0 - /var/folders/dd/xmqm6lfx7v9gjsdyxjq689l80000gn/T/yarn--1585258712841-0.029739773405819347/node
    Yarn: 1.21.1 - /var/folders/dd/xmqm6lfx7v9gjsdyxjq689l80000gn/T/yarn--1585258712841-0.029739773405819347/yarn
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 27, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-29 | Google APIs Intel x86 Atom, android-Q | Android TV Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: ^0.62.0 => 0.62.0
  npmGlobalPackages:
    *react-native*: Not Found

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:61
  • Comments:30 (4 by maintainers)

github_iconTop GitHub Comments

149reactions
jinshin1013commented, Mar 27, 2020

Alright, I got it to build with following this instruction on iOS.

Make sure add this in your Podfile:

# Post Install processing for Flipper
def flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == 'YogaKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
  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

After adding this if you do not have any Swift file in your project, you will see some nasty Swift compile error. Just add new Dummy.swift file to the project and click yes to when it asks you to add bridging or whatever.

121reactions
felexx90commented, Mar 27, 2020

I have the same problem. what I found is that you need to edit the project.pbxproj file and add this

image

Keep in mind that the structure of that file depends a lot on you project. so what I can tell you is that I searched for DEAD_CODE_STRIPPING = NO; and put the code there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native iOS build error FlipperKit Issue, Lexical or ...
I have the same error. After hours, I follow the introduction of https://fbflipper.com/docs/getting-started/react-native-ios/, ...
Read more >
'RCTLog.h' file not found & Us… | Apple Developer Forums
'RCTLog.h' file not found & Use of undeclared identifier 'RNBRANCH_VERSION' build-time error while creating an archive for iOS app.
Read more >
Xcode "Use Of Undeclared Identifier" Errors, Compiles/Runs ...
Flipper & RN 0.62 Build Failed: Use of undeclared identifier 'client' SDKs: iOS SDK: Platforms: iOS 13.4 DriverKit 19.0 macOS 10.15.
Read more >
Using Flipper with React Native - Parashuram's blog
Flipper is a great developer tool for debugging mobile apps and quite ... If you are using a version of React Native lesser...
Read more >
React Native Support - Flipper
Integration between React Native and Flipper is enabled out of the box in React Native version 0.62 and higher. For the setup instructions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found