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

iOS Wrapping react-native into dynamic library caused Fabric components not displayed #43354

Closed
nanatlantica opened this issue Mar 6, 2024 · 4 comments
Labels
Platform: iOS iOS applications. Resolution: Duplicate Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@nanatlantica
Copy link

Description

I wrapped libPods-ReactNativeSDK.a into a dynamic library for the app to depend on it, but my custom Fabric component cannot display (init method not called), and there is no error message.

Steps to reproduce

1.Create dynamic library xcode project
2.install react native by Pod install
3.compile this project into .framework file
4.My app embeded the .framework file
5.Run DYSanae

React Native Version

0.72.5

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 288.92 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.5.1
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.21
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.8.0
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.01.15.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 20.0.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: false
  newArchEnabled: true

Stacktrace or Logs

no exception logs captured

Reproducer

https://github.com/nanatlantica/RNDynamic

Screenshots and Videos

RPReplay_Final1709747122.mp4
@nanatlantica nanatlantica added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.72.11. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cortinico
Copy link
Contributor

Closing as duplicate of #43343
@cipolleschi already answered you over there

@nanatlantica
Copy link
Author

So you meaning �that I should link react-native as a static library, not a dynamic library?

@cipolleschi
Copy link
Contributor

Static libraries and dynamic libraries work with React Native.
What is not supported is wrapping react native in a single piece and drag-and-dropping it around as an XCFramework. We use cocoapods to set up several build flags and build settings that you need in order to make it work properly. If you wrap React Native in a framework and you move it around, you lose those settings.
That setup is not supported and we don't have capacity to support you in the investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS iOS applications. Resolution: Duplicate Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

3 participants