Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build ios with XCode 15.3 after update #5959

Open
mrigo opened this issue Apr 30, 2024 · 7 comments
Open

Can't build ios with XCode 15.3 after update #5959

mrigo opened this issue Apr 30, 2024 · 7 comments
Labels
Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS

Comments

@mrigo
Copy link

mrigo commented Apr 30, 2024

Description

I've updated to XCode 15.3 and now I can't build my app anymore.
I have got this error

ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Undefined symbols for architecture arm64:
  "facebook::hermes::inspector_modern::chrome::enableDebugging(std::__1::unique_ptr<facebook::hermes::inspector_modern::RuntimeAdapter, std::__1::default_delete<facebook::hermes::inspector_modern::RuntimeAdapter>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)", referenced from:
      reanimated::ReanimatedHermesRuntime::ReanimatedHermesRuntime(std::__1::unique_ptr<facebook::hermes::HermesRuntime, std::__1::default_delete<facebook::hermes::HermesRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in libRNReanimated-tvOS.a[29](ReanimatedHermesRuntime.o)
  "facebook::hermes::inspector_modern::chrome::disableDebugging(int)", referenced from:
      reanimated::ReanimatedHermesRuntime::~ReanimatedHermesRuntime() in libRNReanimated-tvOS.a[29](ReanimatedHermesRuntime.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is my package.json

{
  "name": "UFairTV",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "expo run:android",
    "ios": "expo run:ios",
    "tvos": "expo run:ios --scheme UFairTV-tvOS --device \"Apple TV\"",
    "lint": "eslint .",
    "start": "expo start",
    "test": "jest"
  },
  "dependencies": {
    "@expo/metro-runtime": "^3.1.3",
    "@expo/webpack-config": "^19.0.1",
    "@hookform/resolvers": "^3.3.4",
    "@react-native-community/hooks": "^3.0.0",
    "@react-navigation/bottom-tabs": "^6.5.11",
    "@react-navigation/drawer": "^6.6.6",
    "@react-navigation/native": "^6.1.7",
    "@react-navigation/native-stack": "^6.9.13",
    "@react-navigation/stack": "^6.3.20",
    "axios": "^1.6.0",
    "dayjs": "^1.11.10",
    "expo": "^50.0.17",
    "expo-linear-gradient": "~12.3.0",
    "expo-modules-core": "^1.11.13",
    "expo-screen-orientation": "~6.0.6",
    "lodash": "^4.17.21",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "^7.49.3",
    "react-native": "npm:react-native-tvos@latest",
    "react-native-default-preference": "^1.4.4",
    "react-native-device-info": "^10.12.0",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-localization": "^2.3.2",
    "r": "^3.9.0",
    "react-native-reanimated-carousel": "^3.5.1",
    "react-native-safe-area-context": "^4.7.2",
    "react-native-screens": "^3.31.1",
    "react-native-svg": "13.9.0",
    "react-native-video": "^5.2.1",
    "styled-components": "^6.0.8",
    "yup": "^1.3.3"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "^0.74.81",
    "@react-native/eslint-config": "^0.74.81",
    "@react-native/metro-config": "^0.74.81",
    "@tsconfig/react-native": "^3.0.0",
    "@types/react": "^18.0.24",
    "@types/react-native-video": "^5.0.19",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "babel-plugin-styled-components": "^2.1.4",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.8",
    "prettier": "^2.4.1",
    "react-native-svg-transformer": "^1.3.0",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "engines": {
    "node": ">=16"
  }
}

And this is my Podfile

source 'https://github.com/react-native-tvos/react-native-tvos-podspecs.git'
source 'https://cdn.cocoapods.org/'

# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

prepare_react_native_project!

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 'UFairTV' do
  config = use_native_modules!
  platform :ios, min_ios_version_supported

  # 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.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'UFairTVTests' do
    inherit! :complete
    # Pods for testing
  end

end

target 'UFairTV-tvOS' do
  config = use_native_modules!
  platform :tvos, min_ios_version_supported

  # 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.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'UFairTV-tvOSTests' do
    inherit! :complete
    # Pods for testing
  end

end

post_install do |installer|
  config = use_native_modules!
  # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
  react_native_post_install(
    installer,
    config[:reactNativePath],
    :mac_catalyst_enabled => false
  )
  # __apply_Xcode_12_5_M1_post_install_workaround(installer)
end

This is my babel.config.js

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['react-native-reanimated/plugin'],
};

I've tried to remove Hermes but it doesn't work.

I've been stuck for three days on this! I can't find anything anywhere!
What could I do?

Thanks a lot to all of you

Steps to reproduce

  1. update xcode
  2. install react-native-reanimated
  3. build on xcode

Snack or a link to a repository

https://github.com/UFairTV/UFairTVApp

Reanimated version

3.9.0

React Native version

0.73.2

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Apr 30, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Platform: iOS This issue is specific to iOS label Apr 30, 2024
@dionisio28
Copy link

@mrigo I'm facing the same issue, did you find any solution?

@mrigo
Copy link
Author

mrigo commented May 3, 2024

Hey, unfortunately no.. I recreate the entire project from a new one created with the expo cli…

@tomekzaw
Copy link
Member

tomekzaw commented May 5, 2024

Here's a similar issue in react-native repo: facebook/react-native#43498

@mrigo You might want to upgrade to latest version of react-native-tvos and see if it helps.

@gibo77
Copy link

gibo77 commented May 6, 2024

I have almost same issue. I upgraded Xcode, RN 0.74 and Reanimated to 3.10 and it will not build.
I deleted Podfile.lock file. Run pod install. if Podfile.lock not created, run pod install again in iOS folder always.
Then after that I was able to build.

@machiapply
Copy link

I have almost same issue. I upgraded Xcode, RN 0.74 and Reanimated to 3.10 and it will not build. I deleted Podfile.lock file. Run pod install. if Podfile.lock not created, run pod install again in iOS folder always. Then after that I was able to build.

this didn't work for me, still getting the exact same error on Xcode 15.3 (RN 0.73.0, Reanimated 3.8).
oddly, I don't get it on Xcode 15.2, which our App Center is using to build.

@mrbrentkelly
Copy link
Contributor

Getting the same issue with react-native-tvos@0.73.7-1 and reanimated@3.8.1.

Working around it for now by setting HERMES_ENABLE_DEBUGGER to 0 in the Reanimated podspec as suggested here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

6 participants