unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.94k stars 724 forks source link

Unable to run Samples app on iOS #13416

Open MartinZikmund opened 1 year ago

MartinZikmund commented 1 year ago

Current behavior

Trying to run Samples app on iOS Simulator ends with:

clang++ exited with code 1: ld: in /Users/daniel/Library/Caches/Xamarin/mtbs/builds/SamplesApp.netcoremobile/01c38b1798e90a185a2e09d7c2fcf1b8b6b2ae9823c82df85514ef40dafd7f66/obj/Debug/net7.0-ios/iossimulator-arm64/linker-cache/calabash(LPGCDAsyncSocket.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/daniel/Library/Caches/Xamarin/mtbs/builds/SamplesApp.netcoremobile/01c38b1798e90a185a2e09d7c2fcf1b8b6b2ae9823c82df85514ef40dafd7f66/obj/Debug/net7.0-ios/iossimulator-arm64/linker-cache/calabash' clang: error: linker command failed with exit code 1 (use -v to see invocation) SamplesApp.netcoremobile C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7089\targets\Xamarin.Shared.Sdk.targets 1274

Or with the same error in regards to Harfbuzz.NativeAssets.iOS (which can be fixed by the upgrade to latest SkiaSharp)

Expected behavior

Should build and run successfully

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

Bin log: binlog.zip

Youssef1313 commented 1 year ago

Maybe this is the same as https://github.com/xamarin/xamarin-macios/issues/18688?

jeromelaban commented 1 year ago

@MartinZikmund you may want to try upgrading to the latest SkiaSharp which has bindings on arm64. We can't upgrade to the latest 2.88.5 in uno because it would bump to the latest workloads (because of https://github.com/dotnet/sdk/issues/30103). So you'll need to keep the change local for now (inside of the uno solution). The template for 4.10+ have been upgraded already.

MartinZikmund commented 1 year ago

@jeromelaban unfortunately the error above showed up after upgrading everything SkiaSharp to the latest version 🤔

MartinZikmund commented 1 year ago

Can confirm this issue is M1 specific, no problems running Samples app on Intel-based Mac

rolfbjarne commented 1 year ago

I believe this is the problem: https://github.com/calabash/calabash-ios-server/issues/483