.Net Maui builds fail with “building for iOS Simulator, but linking in dylib built for iOS”
Please describe your issue and provide steps to reproduce it:
Login to a Mac with a M1 chip (ARM64 Architecture)
Create a .Net Maui app using .Net 8 (Just the basic app)
Install PDFtron.IOS and PDFtron.IOS.Tools
Select an emulator to deploy to, I used iPad (10th generation) iOS 17.2
Run the application, the build should fail with the following or similar errors:
“error : clang++ exited with code 1:”
"error : ld: building for iOS Simulator, but linking in dylib built for iOS, file ‘[YourMacDestination].nuget/packages/pdftron.ios.tools/10.9.0/lib/net7.0-ios16.1/Tools.resources/Tools.framework/Tools’ for architecture arm64
"
When I build and deploy to an IOS device (Not a Simulator) it works fine. It seems the packages were not built to support ARM simulators? When can we expect a new build with this rectified if my assumption is correct and is there a workaround for now?
Please provide a link to a minimal sample where the issue is reproducible:
Hi, I have reverted to a real device as I do not have a x86 simulators. I have a mac with a M1 chip ARM architecture. Are you saying this will never be supported?
Thank you for your response. According to our Engineering Team, the workaround for running on an arm64 Mac is to instruct the project to use a compatible x86_64 simulator. This can be seen in our maui-sample project, here: