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.

Can't make an iOS build [0.65.0]

See original GitHub issue

Description

This is what i have in 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, '13.2'

target 'Test' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
  end


  pod 'React-Core', :path => '../node_modules/react-native'

end

React Native version:

System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 2.99 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: Not Found
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
    Watchman: 2021.08.02.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0
      System Images: android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7486908
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: ^0.65.0 => 0.65.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

pod update/pod install/pod install --repo-update

##Problem that i am facing Screen Shot 2021-08-19 at 11 59 30 AM

Expected Results

App should build without any issues.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:33 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
mikehardycommented, Aug 23, 2021

Parts of flipper are still included now no matter what in react-native 0.65 especially if you want hermes on ios.

Here’s my full set of hacks.

  post_install do |installer|
    react_native_post_install(installer)

    # Apple Silicon builds require a library path tweak for Swift library discovery or "symbol not found" for swift things
    installer.aggregate_targets.each do |aggregate_target| 
      aggregate_target.user_project.native_targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)']
        end
      end
      aggregate_target.user_project.save
    end

     # Flipper requires a crude patch to bump up iOS deployment target, or "error: thread-local storage is not supported for the current target"
    # I'm not aware of any other way to fix this one other than bumping iOS deployment target to match react-native (iOS 11 now)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
       end
    end

    # ...but if you bump iOS deployment target, Flipper barfs again "Time.h:52:17: error: typedef redefinition with different types"
    # We need to make one crude patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1
    # https://github.com/facebook/flipper/issues/834 - 84 comments and still going...
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h`
  end
6reactions
YaoHuiJicommented, Oct 3, 2021

I tried 0.66 today, now everything works even with default Podfile, you do not need those changes mentioned in this issue and you can enable Flipper too. a big thanks to all developers💗

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native 0.64-65 with XCode 13 build error - Stack Overflow
Anyone else getting this since upgrading to XCode 13 Beta and macOS 12 Beta (Monterey)?. XCode 12.5 still builds successfully with RN 0.64.2...
Read more >
Creating an Xcode project for an app - Apple Developer
To create an Xcode project for your app, choose a template for the platform on which your app will run, and select the...
Read more >
Build failing on Xcode 13.2 : r/reactnative - Reddit
I have no prior experience with iOS and Xcode so I would appreciate any help/suggestion. react-native: 0.65.0. react: 17.0.2. Xcode: 13.2.
Read more >
Upgrading to new versions - React Native
Upgrading requires a small amount of effort, but we try to make it ... an iOS project, and a JavaScript project, upgrading can...
Read more >
Has anyone successfully adopted IAP with EAS Build for their ...
Config Plugins (beta) were released in SDK 41 making it possible to ... EAS Build because Classic Build (expo build) doesn't support IAP....
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