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

Dynamic Linking for iOS is broken on React Native 0.71.1 #35930

Closed
imWildCat opened this issue Jan 22, 2023 · 12 comments
Closed

Dynamic Linking for iOS is broken on React Native 0.71.1 #35930

imWildCat opened this issue Jan 22, 2023 · 12 comments
Labels

Comments

@imWildCat
Copy link

Description

After running pod install with dynamic linking (NO_FLIPPER=1 RCT_NEW_ARCH_ENABLED=0 USE_FRAMEWORKS=dynamic bundle exec pod install), the app cannot be built.

Version

0.71.1

Output of npx react-native info

➜  DemoRN0711 npx react-native info
info Fetching system and libraries information...
System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 13.64 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.19.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 8.19.3 - /opt/homebrew/bin/npm
    Watchman: 2023.01.16.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/[user]/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 31, 32, 33
      Build Tools: 30.0.3, 31.0.0, 33.0.0
      System Images: android-31 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
      Android NDK: 25.1.8937393
  IDEs:
    Android Studio: Electric Eel 2022.1.1 Electric Eel 2022.1.1
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.1 => 0.71.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. npx react-native init DemoRN0711 --skip-install
  2. cd DemoRN0711 && yarn install
  3. cd ios
  4. NO_FLIPPER=1 RCT_NEW_ARCH_ENABLED=0 USE_FRAMEWORKS=dynamic bundle exec pod install
  5. xcodebuild archive -workspace DemoRN0711.xcworkspace/ -scheme DemoRN0711 -configuration Release -archivePath ./DemoRN0711-iphoneos.xcarchive -sdk iphoneos ENABLE_BITCODE=NO SKIP_INSTALL=NO ARCHS=arm64 CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO SUPPORTS_MACCATALYST=NO | xcbeautify

Snack, code example, screenshot, or link to a repository

DemoRN0711.zip

@cipolleschi
Copy link
Contributor

Hi @imWildCat, thank you for opening the issue.

The Old Architecture is working with use_frameworks! :linkage => :static, though, and we have CircleCI jobs to keep it working.
What is the use case? Do you explicitly need dynamic_frameworks?

@imWildCat
Copy link
Author

@cipolleschi thanks for your reply!

I was trying to build React Native binaries to save the overall project compile time.
The old architecture with Dynamic linking works before 0.71.0.

@cipolleschi
Copy link
Contributor

I did some tests today and the current situation is that dynamically linked frameworks stopped working in 0.70, when Hermes is enabled and stopped also for JSC from 0.71. I'm still trying to figure out what happened, but it is not trivial and the issue is highlighting other problems in the codebase.

Is in our intention to try to solve this regression, but, unfortunately, it could take some time to have them back online. I'm sorry for this disruption. :(

@imWildCat
Copy link
Author

No worries! Thanks in advance!

I'm also glad to help but not sure where to get started.

@nurse-the-code
Copy link

I am having similar issues on react-native 0.65. I have been wondering if it could be related to Xcode 14.2?

@extremeheat
Copy link

Same problem, took a while to hunt this down but the dynamic linking setting created lots of funny linker errors after upgrading the RN version.

E.g., "Undefined symbol: facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Value const&)".

https://gist.githubusercontent.com/extremeheat/ad48c8e69fd7319e7af0bafd65636edd/raw

@cipolleschi
Copy link
Contributor

Yeah, we know. I have a few changes almost ready that would fix it. They may be ready for 0.71.3 as we are about to release 0.71.2 this week.

I'm sorry for the disruption.

@cipolleschi
Copy link
Contributor

You can look up how it is going, following this PR: #36003 😉

@kelset
Copy link
Contributor

kelset commented Feb 2, 2023

@imWildCat can you try 0.71.2 and tell us if it's fixed now?

@imWildCat
Copy link
Author

Huge thanks @cipolleschi @kelset !

I queued a build at imWildCat/ReactNative-Binary#25 with 0.71.2

Will let you know when I have the result

@imWildCat
Copy link
Author

Sorry for the delay. I believe this issue has been addressed. My testing PR is still failing due to a different issue, IMO.

@imWildCat
Copy link
Author

Sorry for the delay. I believe this issue has been addressed. My testing PR is still failing due to a different issue, IMO.

This issue has been resolved. Should be a transient issue of GitHub Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants