callstack / react-native-builder-bob

👷‍♂️ Simple set of CLIs to scaffold and build React Native libraries for different targets
https://callstack.github.io/react-native-builder-bob/
2.78k stars 184 forks source link

Backwards compat "package doesn't seem to be linked" in "old arch" app #539

Closed mazenchami closed 7 months ago

mazenchami commented 7 months ago

Description

I'm currently working on a backwards compatible package to be tested in the "new arch" and "old arch" setup. When running in the "new arch", everything works as expected. When running in "old arch", i run into a linking error in both platforms show in the screenshot below:

image

Here is the published NPM package

Packages

Selected options

Link to repro

https://github.com/mazenchami/react-native-awesome-library

Environment

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 427.48 MB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.5.0
    path: ~/.asdf/installs/nodejs/21.5.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.yarn/bin/yarn
  npm:
    version: 10.4.0
    path: ~/.asdf/plugins/nodejs/shims/npm
  Watchman:
    version: 2023.12.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /Users/mazenchami/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /Users/mazenchami/.asdf/shims/javac
  Ruby:
    version: 3.3.0
    path: /Users/mazenchami/.asdf/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
siva-optim commented 7 months ago

I am facing the issue If I try with (Kotlin & Swift bridge). But If I use (Kotlin & OBJC bridge) it is working in old archs. It would be great If i can able to write swift bridge for both old and new architectures

mazenchami commented 7 months ago

ok looks like its been solve for both iOS and Android (new and old archs). See this commit for more details.