Skip to content

Commit

Permalink
Remove reference to name field in the ubrn.config.yaml docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jhugman committed Dec 17, 2024
1 parent a241dfb commit 8116248
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npx create-react-native-library@latest my-rust-lib
```admonish warning title="Version drift"
`create-react-native-library` has changed a few things around recently.
These steps have been tested with `0.35.1` and `0.41.2`, which at time of writing, is the `latest`.
These steps have been tested with `0.35.1` and `0.42.3`, which at time of writing, is the `latest`.
`react-native` also changes from time to time.
Expand Down Expand Up @@ -126,13 +126,14 @@ For now, we just want to get started; let's start with an existing Rust crate th

```yaml
---
name: MyRustLib
rust:
repo: https://github.com/ianthetechie/uniffi-starter
branch: main
manifestPath: rust/foobar/Cargo.toml
```
Save this in a file at the root of your directory, called `ubrn.config.yaml`.

## Step 4: Checkout the Rust code

Now, you should be able to checkout the Rust into the library.
Expand Down
8 changes: 8 additions & 0 deletions docs/src/guides/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ error Failed to build ios project. "xcodebuild" exited with error code '65'. To
```
This can be fixed either by selecting a Simulator rather than a device (it's next to the Play button), or by following the error message and adding a development team in the Signings & Capabilities editor.
### Compiling for iOS gives an error `'UniffiCallInvoker.h' file not found`
We've seen this where there have been problems with the `*.podspec` file for the library.
- if the dependency on `uniffi-bindgen-react-native` isn't listed, it might be the podspec file isn't being generated at all.
- if the dependency on `uniffi-bindgen-react-native` is listed, check that the app's `Podfile` isn't also depending on `uniffi-bindgen-react-native`. Remove one of these dependencies.
- there may be multiple podspec files in your library, both of which depending on `uniffi-bindgen-react-native`. The name in the `ubrn.config.yaml` file can be deleted (where the podspec filename is derived from), as it should match the name derived from the `package.json` file.
10 changes: 10 additions & 0 deletions docs/src/reference/config-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,13 @@ In this case, changing the location of the `ts` directory will require changing
This list of [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)) of file that should not be generated or overwritten by the `--and-generate` flag, and the `generate turbo-module` command.

This is useful if you have customized one or more of the generated files, and do not want lose those changes.

For example, if you want to add C++ files to the library, you may want to change the build files.

```yaml
noOverwrite:
- "*.podspec"
- CMakeLists.txt
```
You can generate the build files once then not overwrite them. Once exclude the files they can be safely edited.

0 comments on commit 8116248

Please sign in to comment.