PREVIEW: Xamarin.iOS Preview 7 (GM) for Xcode 11 and iOS 13

DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai
edited September 13 in Xamarin.iOS

We have a whole host of new updates to support Apple’s latest previews including:

  • iOS 13 and iPadOS 13
  • tvOS 13
  • watchOS 6
  • Xcode 11

To see what’s new in this preview, known issues, and a full API diff, check out the release notes.

How to Get Started

  1. Download and install the Xcode 11 beta from the Apple Developer Portal.
  2. In Visual Studio for Mac, select Visual Studio > Check for Updates, select the Xcode 11 Previews channel, and install the available updates.
  3. In Visual Studio for Mac, select Visual Studio > Preferences > Projects > SDK Locations > Apple and select Xcode-beta.app.
  4. (Optional – Visual Studio 2019 only) Download and install the Xcode 11 preview support VSIX.

Note: News seems to indicate there will be another GM from Apple early next week. Additionally we will have an update to improve template and remote simulator support.

And that’s it! You can now begin building your apps against Xcode 11 and utilize the available iOS 13 APIs within your Xamarin apps. Detailed instructions can be found on the Xamarin Documentation Portal.

Feedback?

Please log an issue on GitHub with any feedback. If you have questions or feedback you would like to share privately, don’t hesitate to reach out directly at [email protected].

Posts

  • m2a2xm2a2x Member ✭✭

    Hello @DavidOrtinau, ty very much for this post and update.
    I can't get it working with WatchOs in configuration.

    I even just create empty project and it's not compiling, tried different configurations:

    `
    Build FAILED.

    MTOUCH : error MT3001: Could not AOT the assembly
    Projects/test/ts/ts.WatchOSExtension/obj/iPhone/Debug/mtouch-cache/3-Build/tsWatchOSExtension.dll'
    0 Warning(s)
    1 Error(s)
    `

    I couldn't wait for the release version the problem is we have some users in our application which are on WatchOs 6 already and they are leaving quite hard feedback for our app.

  • SebastianKruseSebastianKruse USMember ✭✭✭
    @m2a2x every app compiled for watchOS 5 just runs fine on watchOS 6. So if you get bad feedback I would search at another place but it is no reason to use a preview build in production.

    That said, after testing a bunch with the preview build I expirence a white screen lock on iPadOS 13 for all my devices when compiling with the preview. Is this a already known issue?
  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    Preview 4 is now available. <3

  • selcukselcuk USUniversity ✭✭

    Still no luck with the AOT error when you are building or archiving the iOS-watchOS project. I don't know what to do about it. We are kinda stuck with macOS Catalina.

  • RogisterAlainRogisterAlain BEBeta ✭✭✭

    can you tell me how we programmatically detect that we are in Dark mode or Light mode on IOS in Xamarin.IOS c #?

    Thank you

  • DavidCatmullDavidCatmull USMember ✭✭

    How do I get the Xcode 11 Previews channel to appear? All I see is Preview and Stable. I tried re-installing VS but it didn't help.

  • IvanIcinIvanIcin USMember ✭✭✭

    VSIX crashes like crazy :)

  • @DavidCatmull Did you find a solution for this? I'm seeing the same issue.

  • DavidCatmullDavidCatmull USMember ✭✭

    @MichaelPark.1116 It spontaneously started working on Monday.

  • @DavidCatmull Ah ok, I'll wait it out then! Thanks

  • vitalydvitalyd Member

    @DavidOrtinau said:
    1. In Visual Studio for Mac, select Visual Studio > Check for Updates, select the Xcode 11 Previews channel, and install the available updates.

    Hi, David,

    For some reason I don't see [Xcode 11 Previews channel] in the channels list (there are only Stable and Preview). How can I fix it?

  • KalyanKalyan Member ✭✭
    edited August 27

    @vitalyd said:

    @DavidOrtinau said:
    1. In Visual Studio for Mac, select Visual Studio > Check for Updates, select the Xcode 11 Previews channel, and install the available updates.

    Hi, David,

    For some reason I don't see [Xcode 11 Previews channel] in the channels list (there are only Stable and Preview). How can I fix it?

    @DavidOrtinau Same issue in my mission. We need VS professional version for this?

  • KalyanKalyan Member ✭✭
    edited August 27

    @DavidOrtinau Got it. Visual studio account section you must login with some account then you will get Xcode 11 Previews Channel. Thanks

  • KalyanKalyan Member ✭✭

    @vitalyd said:

    @DavidOrtinau said:
    1. In Visual Studio for Mac, select Visual Studio > Check for Updates, select the Xcode 11 Previews channel, and install the available updates.

    Hi, David,

    For some reason I don't see [Xcode 11 Previews channel] in the channels list (there are only Stable and Preview). How can I fix it?

    Visual studio account section you must login with some account then you will get Xcode 11 Previews Channel. Thanks

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭
    edited September 14

    @selcuk said:
    Still no luck with the AOT error when you are building or archiving the iOS-watchOS project. I don't know what to do about it. We are kinda stuck with macOS Catalina.

    With the latest Xcode 11 Previews update today (or yesterday?), still no luck to compile as release on Catalina, the same bug still occurs :/ and on another machine running Mojave, this ends up in a crazy number of errors (after 1 hour! or so of compiling) with a mistarget of the compiled binary for the various platforms:

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    Am I missing something?

    • I am running VS 8.2.6 (build 73), and everything up-to-date on Xcode 11 Previews channel
    • Xcode 11 GM on Catalina beta (latest installed)
    • Everything OK (build/debug) when building in Debug for my specific device
    • However when building for release to AppStore, it fails with
    /path/to/Project/Project.iOS/MTOUCH: Error MT3001: Could not AOT the assembly
    '/path/to/Project/Project.iOS/obj/iPhone/Release/mtouch-cache/32/3-Build/ProjectiOS.exe' (MT3001) (Project.iOS)
    

    I read somewhere (maybe bugzilla) that it could be related to 32-bit compiling on Catalina. I tried to remove armv7 as targeting to only keep 64-bit only hardware. But this is exactly the same!

    As written on September 14 (previous comment here), when trying to build from a Mojave laptop, it builds for over an hour and ends up with 100k+ errors!

    Still, according to this latest post update and https://devblogs.microsoft.com/xamarin/ios-13-and-xcode-11/ it looks like I should be able to build for iOS 13 and publish my app.

    So what am I missing?

  • IvanIcinIvanIcin USMember ✭✭✭
  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    @IvanIcin this is indeed where I found the story about 32-bit (and not bugzilla), looks like I did not remove all 32 bit references. After really temporarily forcing only arm64 and a minimum of iOS 12.0, it packages properly and only fails while publishing with

    Invalid Toolchain. Your app was built with an unsupported version of Xcode or SDK.
    

    In the mean time, looks like Xcode 11 GM 2 has been released so will try again after installing this new GM release.

    Compiling on Mojave did not help as written above, but maybe GM 2 will solve both problems.

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    Follow-up: using Xcode 11 GM 2, restricting to iOS12+ and building on macOS Catalina 10.15 beta 8 works and the .ipa may then be properly uploaded to the App Store for TestFlight testing (or logically publishing as well).

    Unsure yet if GM 2 builds w/o restriction on macOS Mojave (currently still building).

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    Another follow-up regarding building from macOS Mojave. After many hours (!) of building my project for ARMv7 + ARMv7s + ARM64, targeting iOS 9 upwards, it fails with 100542 errors of the type:

    warning: ignoring file /path/to/Project/Project.iOS/obj/iPhone/Release/mtouch-cache/armv7s/ProjectiOS.exe-llvm.o,
    building for iOS-armv7s but attempting to link with file built for unknown-armv7    (error MT5209)
    warning: ignoring file /path/to/Project/Project.iOS/obj/iPhone/Release/mtouch-cache/armv7s/mscorlib.dll-llvm.o,
    building for iOS-armv7s but attempting to link with file built for unknown-armv7    (error MT5209)
    ...
    ...
    Native linking failed, undefined symbol:
    __FFImageLoading_FFImageLoading_AnimatedImage_1_TNativeImageContainer_REF__ctor. Please verify that all the
    necessary frameworks have been referenced and native libarries are properly linked in. (MT5210)
    ...
    ...
    
  • PhysikbuddhaPhysikbuddha DEMember ✭✭
    edited September 18

    @XavierPerseguers You are probably compiling with the LLVM option. It seems to be broken since Xamarin.iOS 12.14.
    Try compiling without.

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    @Physikbuddha Wahoo! Yes, that was it. Thanks so much!!!

  • PhysikbuddhaPhysikbuddha DEMember ✭✭
    edited September 18

    Good to hear that I'm not alone with that specific problem. I managed to locate the problem by looking at the macOS activity monitor, which showed ld eating up a whole core. ld is the LLVM linker executable.

    Unfortunately, you get larger .ipa sizes without LLVM (47.7 MB vs 56.1 MB at my side). I have to do more testing and report this on Github.

    I also wonder if this is related to a plugin like FFImageLoading. I saw this in your error log, and I'm using it as well...

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    Glad to learn that process Id is related to LLVM linker. I've seen that as well but did not investigate where this process came from and it looks like it is using a single CPU core, which is quite inefficient.

    I'm using FFImageLoading and many Syncfusion components, 100k+ errors was too much and I did not have the courage to try to group them and see the actual different types of linker errors.

  • m91m91 USMember ✭✭

    If anyone is having trouble getting the correct VSIX for windows, it's located at the bottom here: https://devblogs.microsoft.com/xamarin/ios-13-and-xcode-11/

    Direct link if you trust a random stranger on the internet: https://download.visualstudio.microsoft.com/download/pr/9c9511c4-4fef-4d9c-ab06-baf2051096eb/ced0a8d52dac7b819d48f10151240816/xamarin.visualstudio.alpha.16.2.0.3049028-15f4129.vsix

    The version number should be 16.2.0.3049028-15f4129 as of today. I found an older version linked elsewhere which would not work, so make sure you get the correct one.

  • alaskanroguealaskanrogue USMember ✭✭✭

    I attempted to install the link above to VS 2019 Preview resulting in:

    9/23/2019 5:54:01 AM - VSIX TaskScheduler: VSIX Update Configuration task has not been successfully registered. 9/23/2019 5:54:01 AM - No mapping between account names and security IDs was done 9/23/2019 5:54:02 AM - Installation of Microsoft.VisualStudio.Android.DeviceManager failed. The extension has a lower version than required by Visual Studio. Please install the extension from Visual Studio Installer instead. 9/23/2019 5:54:02 AM - Install Error : System.InvalidOperationException: Installation of Microsoft.VisualStudio.Android.DeviceManager failed. The extension has a lower version than required by Visual Studio. Please install the extension from Visual Studio Installer instead. at Microsoft.VisualStudio.ExtensionManager.EngineUtilities.EnsureComponentAndPackageAreHigherVersion(ILogger logger, IDependencyGraph dGraph, Catalog catalog, Component vsixComponent) at Microsoft.VisualStudio.ExtensionManager.PackageInstaller.PrepareEngineInstall(IDependencyGraph dGraph, IDependencyComparisonSeed seed, Component vsixComponent, Boolean isProductComponent, Int32& totalInstallationSteps) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary2 extensionsInstalledSoFar, List1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
    at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary2 extensionsInstalledSoFar, List1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress1 progress, Version targetedVsVersion) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)

  • JeffSiemensJeffSiemens USMember ✭✭
    edited September 23

    I can't get Visual Studio for Mac to work at all with the Xcode 11 final. I've tried both the xcode 11 preview channel (VS version 8.2.6.73) and just the regular preview channel (VS version 8.3 preview / 8.3 build 1760).

    When I try to list devices, I cannot see any of the simulators.

    Any suggestions?

  • reydevreydev Member
    edited September 24

    I am getting linking errors in my Xamarin.Forms iOS Project since update of Xcode to version 11 yesterday. Any suggestions? Thanks

    Update: I just got it working. Update Visual studio 2019 to version 16.3 and the linking errors went away. :)

  • m91m91 USMember ✭✭

    https://devblogs.microsoft.com/xamarin/xamarin-dotnet-conf-2019/

    Xcode 11/iOS 13 support is now out in the stable channel, everything seems to be working for me! Had to update to 16.3 on windows as well.

  • DidsDids FIMember ✭✭

    @JeffSiemens said:
    I can't get Visual Studio for Mac to work at all with the Xcode 11 final. I've tried both the xcode 11 preview channel (VS version 8.2.6.73) and just the regular preview channel (VS version 8.3 preview / 8.3 build 1760).

    When I try to list devices, I cannot see any of the simulators.

    Any suggestions?

    Xcode 11 now only provides 3 simulators by default, all for iPhone 11, in case those are the ones you're seeing?

  • AlGardinerAlGardiner USMember

    I haven't been able to find a definitive answer to this. Hopefully someone from MS/Xamarin will chime in. Will there be an update for Visual Studio 2017 (Windows), or must we upgrade to 2019 for Xcode 11 support? A heads up would have been nice.

Sign In or Register to comment.