Open lemonmojo opened 1 year ago
Workaround is now in place until an Xcode update which fixes the issue is out.
We could further improve the code by resolving symlinks on macOS using [NSString stringByResolvingSymlinksInPath]
.
For reference, here's a quick POC showing how to call ObjC from C#: https://github.com/lemonmojo/SimpleDotNETObjCInterop
There's now a string extension in the repo called ResolveSymlinks_AppleOnly
which resolves symlinks using NSString
APIs. It's not in use yet though.
Another problem here is that .NET 8 RC1's NativeAOT doesn't play nice with Xcode 15's new linker. See https://github.com/dotnet/runtime/issues/92491.
As mentioned here, we worked around this by adding -ld_classic
as an additional linker flag in the generated csproj for now.
We hope to be able to remove this once .NET 8 RC2 is out.
-ld_classic
is not required with RC2 anymore so the workaround has been removed in https://github.com/royalapplications/beyondnet/commit/e1336106d4a7ba6df72473f79cfc9d5347bc1cdb.
I haven't yet tested if Xcode 15.1 Beta fixes the symlink issue with xcodebuild. I'll check when 15.1 is released.
Still not fixed in Xcode 15.1
Note to self: Test again with Xcode 16 Beta
Xcode 15 seems to have issues with symlinks when creating XCFrameworks.
The fix likely involves passing it absolute/resolved paths.