I have a NET8.0-iOS project on Visual Studio for Mac 2022, which supports iOS 17 but from April we need to generate App Store build using latest Xcode 16 with iOS 18. So to support this we are migrating from Visual Studio for Mac 2022 to VS code using C# dev kit. While trying to build the project we are getting various issues like the below and unable to publish builds also. Any assistance will be of great help. Thanks in advance.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++ exited with code 1: [/Users/Documents/Dev/NET8_PROD/S/S.iOS.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : ld: building for 'iOS-simulator', but linking in object file (/Users/Documents/Dev/NET8_PROD/S.iOS/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenter.a[arm64]2) built for 'iOS'
[/Users/Documents/Dev/NET8_PROD/S.iOS/S.iOS.csproj] /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/Documents/Dev/NET8_PROD/S.iOS/S.iOS.csproj]
If I go ahead and remove App Center Nuget package, the error come from Google Maps nuget package.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : ld: building for 'iOS-simulator', but linking in object file (/Users/Library/Caches/XamarinBuildDownload/GMps-6.0.1/Maps/Frameworks/GoogleMaps.framework/GoogleMaps) built for 'iOS' [/Users/Documents/Dev/NET8_PROD/S.iOS/S.iOS.csproj]
I am presently trying to build on simulator running on Apple Silicon M3 Max. I tried both in VSCode and Rider getting the same error.
Visual Studio for Mac 2022 has ended support but still somehow runs iOS 18 simulators and runs on device, I am working on this for existing development but unable to generate build for App Store using the same. I am totally stuck in this for past week and any help would be greatly appreciated.
I have a NET8.0-iOS project on Visual Studio for Mac 2022, which supports iOS 17 but from April we need to generate App Store build using latest Xcode 16 with iOS 18. So to support this we are migrating from Visual Studio for Mac 2022 to VS code using C# dev kit. While trying to build the project we are getting various issues like the below and unable to publish builds also. Any assistance will be of great help. Thanks in advance.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++ exited with code 1: [/Users/Documents/Dev/NET8_PROD/S/S.iOS.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : ld: building for 'iOS-simulator', but linking in object file (/Users/Documents/Dev/NET8_PROD/S.iOS/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenter.a[arm64]2) built for 'iOS'
[/Users/Documents/Dev/NET8_PROD/S.iOS/S.iOS.csproj] /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/Documents/Dev/NET8_PROD/S.iOS/S.iOS.csproj]
If I go ahead and remove App Center Nuget package, the error come from Google Maps nuget package.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : ld: building for 'iOS-simulator', but linking in object file (/Users/Library/Caches/XamarinBuildDownload/GMps-6.0.1/Maps/Frameworks/GoogleMaps.framework/GoogleMaps) built for 'iOS' [/Users/Documents/Dev/NET8_PROD/S.iOS/S.iOS.csproj]
I am presently trying to build on simulator running on Apple Silicon M3 Max. I tried both in VSCode and Rider getting the same error.
Visual Studio for Mac 2022 has ended support but still somehow runs iOS 18 simulators and runs on device, I am working on this for existing development but unable to generate build for App Store using the same. I am totally stuck in this for past week and any help would be greatly appreciated.
Share Improve this question edited Mar 14 at 12:37 LMA 46711 bronze badges asked Mar 14 at 12:29 MaddieeMaddiee 2872 silver badges13 bronze badges 6- is this a MAUI or a Xamarin project? – Jason Commented Mar 14 at 14:53
- Latest Xcode is probably the cause. Did you try to downgrade to Xcode 16.1? – Lex Li Commented Mar 14 at 16:14
- Xamarin Project – Maddiee Commented Mar 14 at 19:17
- No, I am trying in 16.2, I'll try if you say so. – Maddiee Commented Mar 14 at 19:17
- Xamarin projects do not support the latest version of iOS or XCode. Note that as of next month you will not be able to submit Xamarin projects to the App Store because of this. – Jason Commented Mar 14 at 20:05
2 Answers
Reset to default 0Added this in .csproj file, which seems to fix the issue with nuget package.
<PropertyGroup Condition="'$(RuntimeIdentifier)' != 'ios-arm64'">
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
</PropertyGroup>
Not the answer for your question, but you can still build and archive apps using the last Xcode versione (16.2).
You need to execute this workaround:
cd /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents
sudo mkdir Frameworks
sudo cp -r /Applications/Xcode.app/Contents/SharedFrameworks/AppThinning.framework ./Frameworks