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

Can't build for iOS simulator on arm64 Mac computer #1063

Closed
MichaelSL opened this issue Jun 14, 2023 · 11 comments
Closed

Can't build for iOS simulator on arm64 Mac computer #1063

MichaelSL opened this issue Jun 14, 2023 · 11 comments
Labels
bug Something isn't working requires external features We can not fix this for now, we need a feature that is out of this library.

Comments

@MichaelSL
Copy link

Describe the bug
When I try to build my application which uses LiveCharts2 for iOS Simulator on arm64 Mac I get the following error:

clang++ exited with code 1:
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/michael/Library/Caches/Xamarin/mtbs/builds/Tripsta/aeec817e023fc4d3a63619795aaa688cc328fc8828ed80ecf5ca133f3233a78d/C:/Users/Michael/.nuget/packages/skiasharp.nativeassets.ios/2.88.3/runtimes/ios/native/libSkiaSharp.framework/libSkiaSharp' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)	Tripsta	C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7060\targets\Xamarin.Shared.Sdk.targets	1274	

To Reproduce
Steps to reproduce the behavior:

  1. Create a .NET MAUI Application
  2. Reference LiveChartsCore.SkiaSharpView.Maui
  3. Try to run your application on Simulator using Apple Silicon ARM64 Mac machine as a build host
  4. See error

Expected behavior
The application is built successfully and started on Simulator

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 11 with Visual Studio + MacOSX Ventura 13.4 as a build host

Smartphone (please complete the following information):

  • Device: Simulator
  • OS: iOS16.4

Additional context
Build still works for:

  • physical device
  • for Simulator if using Intel based Mac as a build host
@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Jun 17, 2023

Thanks for the report, it seems that the SkiaSharp team already got this, this should be fixed with mono/SkiaSharp#2468 in a future version of LiveCharts we will reference a version that contains that fix.

We can also track this issue at mono/SkiaSharp#2307.

I will keep this open as reminder to update that.

@beto-rodriguez beto-rodriguez added requires external features We can not fix this for now, we need a feature that is out of this library. bug Something isn't working labels Jun 17, 2023
@mattleibow
Copy link

I merged the change, there should be an update appearing in a few hours on the preview feed: https://aka.ms/skiasharp-eap/index.json

@beto-rodriguez
Copy link
Owner

thanks for the update! @mattleibow

@maslewandowski
Copy link

Does skiasharp generally work on ios devices? I tried to get it working with the startup documentation but unfortunately, it works on android emulator but not on ipad pro deployed via usb / hot restart.

@beto-rodriguez
Copy link
Owner

@maslewandowski SkiaSharp works on IOS, the problem seems to be in this library, probably related to #800, I am trying to fix that for the next release.

@MichaelSL
Copy link
Author

Updated LiveChartsCore.SkiaSharpView.Maui from 2.0.0-beta.701 to 2.0.0-beta.810 - issue is still reproducable.
Real devise (iPhone) deploy still works

@beto-rodriguez
Copy link
Owner

@MichaelSL version beta.850 uses the latest version of SkiaSharp, it should be fixed on that version, is it working for you?

@MichaelSL
Copy link
Author

@beto-rodriguez I can confirm beta.850 fixed the issue with simulator, app build ok and launches on simulator.

It broke my custom gauge though ;)

image

@beto-rodriguez
Copy link
Owner

we can track that in another issue, thanks for the feedback! feel free to open a new issue with the case!

@MichaelSL
Copy link
Author

@beto-rodriguez yep, sure; this one is fixed and should be closed. I think my issue is because I was scaling the graph according to screen density and you've added the inbuilt scaling support in 850.1. Most likely I'll just have to remove my scaling and it should work. Not sure it needs an issue, maybe just mention that somewhere so folks who scaled manually would know.

@beto-rodriguez
Copy link
Owner

yes, Livecharts for Maui now looks better on different devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working requires external features We can not fix this for now, we need a feature that is out of this library.
Projects
None yet
Development

No branches or pull requests

4 participants