Closed rpendleton closed 2 months ago
Hi @rpendleton , thank you for reaching out! This issue is a duplicate of https://github.com/microsoft/appcenter-sdk-dotnet/issues/1755, which was closed as not planned.
As a workaround, you can disable App Center in Debug mode.
You are correct about moving to xcframework. The tricky part is that the native App Center SDK is distributed as a static xcframework, which does not work well with .NET, or at least I couldn't make it work. Building a dynamic xcframework would require significant changes to the native SDK build system.
If you have the time and desire to help, we would greatly appreciate your contribution!
Thanks. My team had actually tried conditional PackageReferences based on RuntimeIdentifier before opening this ticket, but were running into inconsistent issues when switching back and forth between simulators and physical device. We haven't tried to make the condition based on configuration (Debug/Release) or any other property though, so I guess we'll continue down that path.
Since #1755 was closed as not planned, I'll go ahead and close this issue as not planned as well.
Description
When using the App Center .NET SDK in a net8.0-ios project, the app fails to compile when building for simulators on an Apple Silicon Mac:
This is happening because the AppCenter.a file created by the binding project contains a framework with slices for an x86_64 simulator, arm64 device, and arm64e device, but it's missing a slice for arm64 simulators. Adding this slice would likely require moving from a normal
.framework
to an.xcframework
.Interestingly, the microsoft/appcenter-sdk-apple project already publishes an
.xcframework
that appears to support arm64 simulators. However, the build process for the .NET SDK strips slices from the frameworks within that.xcframework
to produce a single.framework
, and that framework is only compatible with the x86_64 simulator architecture.I understand that App Center is scheduled to be retired at the end of March 2025, so I'd understand if this is something that isn't likely to be fixed. However, that's still around seven months away from now, and until we're able to fully migrate away from App Center, the lack of arm64 simulator compatibility can lead to quite a few problems.
As of Xcode 14.3, Apple no longer supports running Xcode with Rosetta. Trying to run a simulator app built for x86_64 on an arm64 Mac results in obscure defects, such as delegate events triggering multiple times unexpectedly, or swipe to delete not working in certain situations. These defects only occur when running an x86_64 simulator app on an arm64 Mac (which might seem like a defect in Xcode), but Apple's response is that defects such as these are expected, and the solution is to move away from x86_64 simulator apps on arm64 Macs.
With that said, is this something that could be fixed in a new release of the SDK? And if so, is it something your team would be willing to work on, or do you suspect that a fix would only be possible if it was contributed by an external contributor?
Repro Steps
Create a new .NET iOS project using:
dotnet new ios
Add the following package references to the project:
Try to build to a simulator on an Apple Silicon Mac
Details
AppCenter.LogLevel = LogLevel.Verbose
before your call toAppCenter.Start(...)
and include the logs here: N/A since the project doesn't compile