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

External xcframework isn't copied when build #613

Closed
1 of 2 tasks
carlosriveroib opened this issue Aug 14, 2024 · 2 comments
Closed
1 of 2 tasks

External xcframework isn't copied when build #613

carlosriveroib opened this issue Aug 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@carlosriveroib
Copy link

Description

Hi,

I've made a react native module which needs an external library. I've copied it to the root of the project and then I've added in .podspec file s.vendored_frameworks = "XXXX.xcframework"

This works, but when I do yarn prepare the XXXX.xcframework is not copied and then when I install it in my project the framework is not there and I cannot use it

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

default options

"react-native-builder-bob": {
    "source": "src",
    "output": "lib",
    "targets": [
      [
        "commonjs",
        {
          "esm": true
        }
      ],
      [
        "module",
        {
          "esm": true
        }
      ],
      [
        "typescript",
        {
          "project": "tsconfig.build.json"
        }
      ]
    ]
  },

Link to repro

https://github.com

Environment

System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Pro
Memory: 1.30 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.2
path: ~/Library/Caches/fnm_multishells/2229_1723662098682/bin/node
Yarn:
version: 3.6.1
path: ~/Library/Caches/fnm_multishells/2229_1723662098682/bin/yarn
npm:
version: 10.5.0
path: ~/Library/Caches/fnm_multishells/2229_1723662098682/bin/npm
Watchman:
version: 2024.07.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/carlos/.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:
API Levels:
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
- "34"
Build Tools:
- 30.0.3
- 33.0.1
- 34.0.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-32 | Google APIs ARM 64 v8a
- android-33-ext5 | Google Play ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.15989.150.2411.11948838
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.9
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/carlos/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.3
wanted: 0.74.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: false
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

@carlosriveroib carlosriveroib added the bug Something isn't working label Aug 14, 2024
@satya164
Copy link
Member

but when I do yarn prepare the XXXX.xcframework is not copied

Why should it be copied?

when I install it in my project the framework is not there

Did you add it to the files array in package.json? https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files

@carlosriveroib
Copy link
Author

Sorry for the inconvenience, I didn't know files option in package.json, this solved my problem. Thank you very much, you saved my day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants