xamarin-macios
xamarin-macios copied to clipboard
[Meta] Xcode 14.0 Support
Apple released Xcode 14.0 on September 12, 2022 we are working to get our Xcode 14 support release out in the meantime if you use Xamarin we recommend you to not upgrade to Xcode 14 just yet and keep using Xcode 13.4.1.
If you updated to Xcode 14, you have 2 options:
- You can download Xcode 13.4.1 from the downloads page in the Apple Developer Portal and continue to use it.
- Use a build from our xcode14 branch, this is where our next stable release is coming out and it includes all the iOS 15 SDKs APIs, that said we are still ironing it out.
We will keep this issue updated as we go to have the final builds declared.
If you are currently using .NET MAUI you will need to wait a little longer in order to use Xcode 14, as for now we highly encourage you to use option 1 above.
Thank you for your patience!
The macios team!
Hi @dalexsoto Can you please answer the original question in the original thread #15946 ?
"Where is the definitive source of truth, a page that is kept up to date, indicating compatibility with Xcode?"
Let's resolve the root issue which is the lack of documentation surrounding how to know whether it is safe to do any Xcode upgrade - i.e, a compatibility matrix between the Xamarin, and Xcode releases.
Thanks for your time
Hi @dalexsoto Can you please answer the original question in the original thread #15946 ?
"Where is the definitive source of truth, a page that is kept up to date, indicating compatibility with Xcode?"
Let's resolve the root issue which is the lack of documentation surrounding how to know whether it is safe to do any Xcode upgrade - i.e, a compatibility matrix between the Xamarin, and Xcode releases.
Thanks for your time
As of today for Xamarin packages the major version part matches the iOS version they are meant for, so for example xamarin.ios 16.x.x will be meant to be used with the iOS 16 SDK which is part of Xcode 14. But the true rule of thumb is that you will always want to use the latest Xcode release with the latest stable Xamarin provided by your Visual Studio. The only time it does not entirely apply is when Xcode has major releases where we are always a little behind because we get Xcode the same day as everyone else so we need some time to catch up and produce builds with the latest release.
Thanks!
Thank you for this information, I am really grateful to you that I am up and running again. I installed XCode 14 and the problems started. I have uninstalled 14 and installed 13.4.1 and it's all working fine. Touch wood. I second what Adam-Langley said, this should be clearly documented somewhere, not hidden in a single bug post here. Just a clear list of current recommended versions of all frameworks.
With option two I have error "failed to compile the generated registrar code" when I want to deploy to device with development provisioning profile. Anyone else have similar error?
With option two I have error "failed to compile the generated registrar code" when I want to deploy to device with development provisioning profile. Anyone else have similar error?
Yes, I do. But I guess it makes sense if your phone is still on iOS 15 as mine. I will update to iOS 16 and try it again
With option two I have error "failed to compile the generated registrar code" when I want to deploy to device with development provisioning profile. Anyone else have similar error?
Yes, I do. But I guess it makes sense if your phone is still on iOS 15 as mine. I will update to iOS 16 and try it again
Mine is on iOS 16
VS for Mac 17.3.5 with xamarin.ios-15.99.0.464 Xcode 14 iOS 16
I get following build error:
MTOUCH: Error MT4109: Failed to compile the generated registrar code. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new (MT4109)
Relevant extract from the build log:
/mtouch-cache/registrar.h:113:9: fatal error: 'CHIP/CHIP.h' file not found
#import <CHIP/CHIP.h>
^~~~~~~~~~~~~
1 error generated.
Happening for me aswell.
Have the same issue
+1
The +1 and "have same issue" comments are not valuable, use reactions at the opening post.
The +1 and "have same issue" comments are not valuable, use reactions at the opening post.
+1
The Xamarin quickstart page is not accurate as of XCode 14's release: https://docs.microsoft.com/en-us/xamarin/ios/get-started/hello-ios/hello-ios-quickstart?pivots=macos#requirements
iOS development with Xamarin requires:
- Latest version of Xcode and iOS SDK installed from the App Store .
Is this for legacy Xamarin only? I did download & install that preview package but still getting an error when trying to compile my .NET6 (non-MAUI) iOS app.
Tool /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64/6.0.9/Sdk/../tools/mono-aot-cross execution finished (exit code = 134).
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.447/targets/Xamarin.Shared.Sdk.targets(1000,3): error : Failed to AOT compile SQLitePCLRaw.provider.sqlite3.dll, the AOT compiler exited with code 134 [/path_to_csproj]
Edit: ignore my comment, my problem is likely related to something else and not the Xcode update
@dalexsoto, you closed linked https://github.com/xamarin/xamarin-macios/issues/15946 issue based on this issue, depriving OP @Adam-Langley and many in the community of an answer to his important question: "Where is the definitive source of truth, a page that is kept up to date, indicating compatibility with Xcode?".
Unlike this issue, which relates specifically to Xcode 14, @Adam-Langley seeks to answer a more fundamental question that continues to cost many developers countless hours of trial and error with each new Xcode release.
Please re-open https://github.com/xamarin/xamarin-macios/issues/15946, or provide some response here to his important inquiry: At any point in time, how can we determine the latest compatible Xcode version?
@pm64 while I have my own notable remarks on Xamarin that I decided to keep silent at the moment, I do think that this was answered.
Microsoft tries to support the latest version of XCode with the latest version of VS. As XCode may break this without any previous notice there is no practical way to inform people. They just try to issue update as soon as possible.
That’s from me to save some time so that people can work now when they should work and not answer the questions.
17.4.0 Preview 2.0 problem still exists.
XCode 14 & xamarin.ios-15.99.0.464 installed on Mac.
build is ok on simulator. but error on device (iPhone 12 mini iOS 16):
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(235,3): error GE71D2E27: no type or protocol named 'BADownloadManagerDelegate' 4>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(235,3): error MT4109: Failed to compile the generated registrar code. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
I got these two errors when trying to compile a Xamarin project and an iPhone iOS 16.
- XCode 14
- Visual Studio 17.3.5
- Xamarin.iOS 15.99.0.464

Ah right, Apple removed the Background Assets framework from Xcode 14 and that build does not account for that just yet, the registrar errors will be gone in the next update.
The other way you can workaround this is by setting the linker to Link SDK assemblies only, this should get rid of the registrar errors.
@dalexsoto, GREAT!!!! Working on a real iPhone and the emulator, both with iOS 16 ✅
@dalexsoto Working fine for me too!! Thanks for the solution.
- You can download Xcode 13.4.1 from the downloads page in the Apple Developer Portal and continue to use it.
My 2c on that. This tool isn't from MS (and probably isn't endorsed by them in any way) but for those wanting to easily manage, download, and keep multiple versions of Xcode side by side should check out Xcodes.
Minor version increments of Xcode shouldn't break things, but when it does it is a pain to re-download, extract, etc. So it is super handy to keep them side by side and use this tool to select current active version. Then uninstall when you are happy with stability of the latest version.
VS4Mac also jumps to the correct version of Xcode when you mark them as active within the app so you don't have to go touch that config either.
One tip for developers:
Ensure Automatic Updates is turned OFF within the App Store settings and NEVER actually update anything on your day to day machine until you can test it out completely on another machine/vm first.
FYI: Just in case anyone (like me) went and installed 13.4.1 directly off the Apple site (alongside 14) before they knew about the existence of XCodes (also me) - and XCodes isn't detecting you have 13.4.1 installed (yes, also me too) :
If you launch XCode 13.4.1 (or I think from 14? too) - go into the Preferences > Locations - you can tell it to use the XCode 13.4.1 Command Line tools which is the magic thing needed for VS2022 (on PC or Mac) to launch the 13.4.1 Simulators for debugging. I think XCodes is doing something like this under the hood too.

Note the first time I launched it I had a few popups for security/creation of folders etc, just answered OK to it all and now it's all working smoothly.
XCode14 support would be great though (and I really hope this is being prioritized there) - don't necessarily need specific Xamarin iOS16 SDK support yet - but just want the ability to launch the iPhone14xxx + iOS16 simulators for debugging. I imagine a fair amount of my clients customers went and updated their old devices to iOS16 this week and we really need to support it ASAP.
I have a different error when trying to build and install on real device.
Error running 'MyApp.iOS': Failed to install application on device qqq: error HE0004: Could not load the framework 'DVTITunesSoftwareServiceFoundation' (path: /Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation): dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation, 0x0001): Library not loaded: '@rpath/ContentDelivery.framework/Versions/A/ContentDelivery' // Referenced from: '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/DVTITunesSoftwareServiceFoundation' // Reason: tried: '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.12.0.2/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFram... (4 minutes ago)
Having the same issue as @IngweLand
Also, if you're using Venture you can't use Xcode 13 nor its Command Line Tools
it seems I gotta wait for Xcode 14 support to land
Just going to leave my observation of using Visual Studio for Mac Preview and .Net Maui targeting an iPhone. Was all working fine on xCode 13 then I made the mistake of upgrading to 14. Upgrade took ages and then I was not able to see the simulators as discussed above. I downloaded 13.4.1 as suggested and renamed original Xcode 14 so both could live in the Applications folder.
I then got the simulators back in Visual Studio but when I try and deploy to the iPhone the code downloads then fails to install. The app appears to have a Cloud download icon next to it. Visual Studio sits saying something like .. waiting for the debugger to connect to X's iPhone on port 10000 via USB.
If anyone has any ideas, then do let me know but I get the feeling Xcode 14 download has modified something that I need to undo.
@berniemills if you start Xcode 13 and go to Preferences > Locations
Then change the Command Line tools back to 13.x.x then you should be good to go again
Thanks @Cheesebaron but I did try that. Rather annoyingly I had .net Maui deploying to iPhone on mac all working fine a day or so ago with Xcode 13 but it's clearly messed up now. Its failing to launch the debugger on the iPhone. Saying it could not locate device support files. A lot of head scratching ahead I think.
@berniemills try downloading support files for your phone from here https://github.com/filsv/iOSDeviceSupport