microsoft/rnx-kit

@rnx-kit/react-native-host auto linking is broken

ospfranco opened this issue · 2 comments

What happened?

Hi, I needed to create an app clip using RN. For this I needed a brownfield integration. After some research I stumbled into this article:

https://www.callstack.com/blog/simplify-your-ios-brownfield-integration-with-react-native-host

Where they recommended to use rnx-kit/react-native-host. I installed the package but to my surprise when I did a pod install, auto linking is not working. I ended up adding the pod manually into my Podfile. It's probably some name mismatch:

pod 'ReactNativeHost', :path => "../node_modules/@rnx-kit/react-native-host"

Affected Package

"@rnx-kit/react-native-host": "0.4.10",

Version

0.4.10

Which platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows

System Information

System:
  OS: macOS 14.5
  CPU: (11) arm64 Apple M3 Pro
  Memory: 102.78 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.13.1
    path: ~/.local/share/mise/installs/node/20/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.local/share/mise/installs/node/20/bin/yarn
  npm:
    version: 10.5.2
    path: ~/.local/share/mise/installs/node/20/bin/npm
  Watchman:
    version: 2024.06.24.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/osp/.local/share/mise/installs/ruby/3/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-33 | Google Play ARM 64 v8a
    Android NDK: 26.1.10909125
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 3.3.1
    path: /Users/osp/.local/share/mise/installs/ruby/3/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.1
    wanted: 0.74.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to Reproduce

Just install the depedency and do a pod install

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hm, it looks like it was disabled in #3124, I'm curious what's the motivation 🤔

@ospfranco: It does look like we intentionally disabled autolinking. Iirc, it was because if you use react-native-test-app, it would be linked twice and cause issues. I will update the docs on how to integrate @rnx-kit/react-native-host properly.