Skip to content

Commit 259966e

Browse files
committed
Update readme to not include .net target framework in build paths
1 parent c10d325 commit 259966e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ public class Hello
9090
```
9191

9292
- Compile the .NET class library: `dotnet publish`.
93-
- Note the published dll's output path (should be something like this `/Path/To/BeyondDemo/bin/Release/net9.0/publish/BeyondDemo.dll`).
93+
- Note the published dll's output path (should be something like this `/Path/To/BeyondDemo/bin/Release/publish/BeyondDemo.dll`).
9494
- Create a config file for Beyond.NET: `touch Config.json`.
9595
- Open `Config.json` in a text editor.
9696
- Replace its contents with this:
9797

9898
```json
9999
{
100-
"AssemblyPath": "bin/Release/net9.0/publish/BeyondDemo.dll",
100+
"AssemblyPath": "bin/Release/publish/BeyondDemo.dll",
101101

102102
"Build": {
103103
"Target": "apple-universal"
@@ -110,8 +110,8 @@ public class Hello
110110
- Run the generator: `beyondnetgen Config.json`.
111111
- On a Mac Studio M2 Ultra, this takes a little more than a minute while on an 8-Core Intel Xeon iMac Pro, it takes around 3 minutes. So it might be worth getting some coffee depending on your hardware. (TODO: Outdated info, as now with parallel building support the times are way better)
112112
- The individual code generation and builds steps are shown in the terminal.
113-
- The last printed line should include the path where the build output has been written to (ie. `Build Output has been written to "/Path/To/BeyondDemo/bin/Release/net9.0/publish"`).
114-
- Check the contents of the build output path: `ls bin/Release/net9.0/publish`
113+
- The last printed line should include the path where the build output has been written to (ie. `Build Output has been written to "/Path/To/BeyondDemo/bin/Release/publish"`).
114+
- Check the contents of the build output path: `ls bin/Release/publish`
115115
- It should include an XCFramework bundle called `BeyondDemoKit.xcframework`.
116116
- Congratulations, you now have a fully functional native version of your .NET library that can be consumed by macOS and iOS Xcode projects.
117117

@@ -131,7 +131,7 @@ Now that we have an XCFramework containing binaries for macOS and iOS, we can in
131131
- Select the `General` tab.
132132
- Under `Frameworks, Libraries and Embedded Content`, click the `+` button.
133133
- Select `Add Other... - Add Files...`.
134-
- Navigate one level up in the file picker, then go to `bin/Release/net9.0/publish` (depending on your output path).
134+
- Navigate one level up in the file picker, then go to `bin/Release/publish` (depending on your output path).
135135
- Select `BeyondDemoKit.xcframework`.
136136
- The XCFramework should now show up and it should already be configured to `Embed & Sign`.
137137
- Select `ContentView.swift` in the project navigator.

README_MANUAL_BUILD.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- Also, the install name of dylibs created by .NET's NativeAOT compiler needs to adjusted from `/usr/lib/MyLibNative.dylib` to `@rpath/MyLibNative.dylib`.
1414
- There's a sample publish script which does all of this in the repository called `publish_macos_universal`. You can use this as the basis for your build. Just make sure to adjust the `OUTPUT_PRODUCT_NAME` variable to match the assembly name of your .NET library (`MyLib`).
1515
- Run the publish script (ie. `./publish_macos_universal`).
16-
- On macOS this will produce a universal `MyNativeLib.dylib` in the bin directory under `bin/Release/net9.0/osx-universal/publish`.
16+
- On macOS this will produce a universal `MyNativeLib.dylib` in the bin directory under `bin/Release/osx-universal/publish`.
1717

1818

1919
### Use generated bindings from Swift
@@ -27,7 +27,7 @@
2727
- Select "Add other... - Add files..." and select the native dylib (ie. `MyNativeLib.dylib`)
2828
- Try to build the project. If it fails, you might need to adjust either your header or library search paths in the project settings.
2929
- If Xcode fails to link the native dylib (the error looks something like this: `Library not found for -lMyNativeLib`) you need to adjust "Build Settings - Library Search Paths" in you project settings to point to the path where the library is located.
30-
- For example, if the native library is located one level below your Xcode project in a folder called "MyLibNative/bin/Release/net9.0/osx-universal/publish" use this: `$(PROJECT_DIR)/../MyLibNative/bin/Release/net9.0/osx-universal/publish`)
30+
- For example, if the native library is located one level below your Xcode project in a folder called "MyLibNative/bin/Release/osx-universal/publish" use this: `$(PROJECT_DIR)/../MyLibNative/bin/Release/osx-universal/publish`)
3131
- If Xcode complains about being unable to find the generated C header, adjust "Build Settings - Header Search Paths" to point to the path where the generated header is located.
3232
- For example, if your header is one level below your Xcode project in a folder called "Generated" use this: `$(PROJECT_DIR)/../Generated`
3333
- You're now ready to call any of the APIs that bindings were generated for.

0 commit comments

Comments
 (0)