xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.44k stars 510 forks source link

[Meta] Xcode 13.0 Support #12778

Closed dalexsoto closed 2 years ago

dalexsoto commented 3 years ago

🚨 Update ⚠️

Hello All!

We have what we believe is the final build for Xcode 13 Support

Thank you for your patience!

The macios team!


~Apple released Xcode 13.0 on September 20, 2021 we are working to get our Xcode 13 support release out in the meantime if you use Xamarin we recommend you to not upgrade to Xcode 13 just yet and keep using Xcode 12.5.~

~If you updated to Xcode 13, you have 3 options:~

  1. ~You can download Xcode 12.5 from the downloads page in the Apple Developer Portal and continue to use it.~
  2. ~If you need to keep Xcode 13 but want to use our current stable d16-10 bits you will need to install the following in you macOS machine~
  3. ~Use a build from our [xcode13-ios]() 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.~

~Thank you for your patience!~

~The macios team!~

htmoore commented 2 years ago

Thanks, now my simulators are showing but my physical devices (iPhone 11 Pro Max and iPad Pro 3rd gen) are gone. I'm assuming this is related? Any ideas? I'm using VS 2019 on Windows.

dalexsoto commented 2 years ago

@htmoore make sure the info.plist's MinimumOSVersion is lower than the iOS version installed on your physical device or make sure that your iPhone version is higher or matches the MinimumOSVersion number in your info.plist's App.

Look at the tongue twister I just wrote...

MickCG commented 2 years ago

This of course is a package for the Mac. I installed it and sure enough I could again compile and deploy to my iPhone. Since I use my Win 10 machine for development, how long before the new update becomes available to Win 10? Or is something wrong since it is not deploying with the same error.

alvartabe commented 2 years ago

should i just install xamarin.ios-15.0.0.6.pkg on my mac?

seanstilson commented 2 years ago

xamarin.ios-15.0.0.6.pkg works on mac. Nice work! Thanks for all the O.T. @dalexsoto !

beeradmoore commented 2 years ago

I'll try make a small repro project today.

@beeradmoore thank you for your report! Please, if you are able to make that repro test case please make a new bug with all the details so it does not get lost. Thank you!

@dalexsoto I have filed the issue #12833

bbotea commented 2 years ago

Just installed the xamarin.ios-15.0.0.6.pkg and can confirm that the simulators are working for ios 15. Thanks!

jonathan-caddy commented 2 years ago

Xamarin Shell-based templates do not display the UI elements of the shell when targeting iOS15. The elements are active on the pages and can be clicked but they are not visible. Created two new test projects based on the "Flyout" and "Tabbed" templates using VS2019 on MacOS (8.10.9 build 3) - build and deploy to either simulator or physical device running iOS15. Screenshot's below with arrows to indicate where UI nav elements are.

Tabbed App image

Flyout App image

dalexsoto commented 2 years ago

@jonathan-caddy please file a bug against the Xamarin.Forms repo

jonathan-caddy commented 2 years ago

Sorry @dalexsoto - will do...

SaravananWipro commented 2 years ago

@SaravananWipro that's a new warning, and it's probably an error because you're building with /warnaserror.

In any case, the fix is to do this:

UIApplication.Main (args, null, typeof (AppDelegate));

instead of this:

UIApplication.Main (args, null, "AppDelegate");

(adjust the code accordingly if your call to UIApplication.Main is different).

Thanks, working fine with these changes.

SaravananWipro commented 2 years ago

Can we consider xamarin.ios-15.0.0.6.pkg is official release? Or when we will get release details here https://docs.microsoft.com/en-us/xamarin/ios/release-notes/

fekberg commented 2 years ago

15.0.0.6 doesn't allow me to deploy to a real device, but simulators work fine.

/Library/Frameworks/Xamarin.iOS.framework/Versions/15.0.0.6/SDKs/Xamarin.WatchOS.sdk/include/xamarin/runtime.h:252:8: note: candidate function not viable: cannot convert argument of incomplete type 'MonoException *' (aka '_MonoException *') to 'MonoObject *' (aka '_MonoObject *') for 1st argument
void                    xamarin_process_managed_exception (MonoObject *exc);```

image

sencagri commented 2 years ago

This did not work for me. I need to publish an app and sadly I am very new to Mac world. Is there any workaround to this ?

Immons commented 2 years ago

Hot reload still not working with 15.0.0.6 package...

tomwalker-guestlogix commented 2 years ago

I'm in the process of setting up a local Azure agent on my Mac. Right now the Azure hosted agents do not have the latest Xamarin.iOS and Xcode 13. I've noticed that Xamain.iOS capabilities was not listed for my local agent. So I had to manual add in the capability. Does any one know what the value I need to set? I have the 15.0.0.6 packaged installed using the defaults.

stephenhauck commented 2 years ago

I got a brand new Apple silicon Macbook Air on Friday and have been trying multiple things. I can confirm this did fix my issue and is allowing me to build and run at this time. Although this is a cursory test I did want to let you know that it does not show "Debug - iOS Simulator " like normal ...don't really care just glad it's working since I have to trade in my other Mac on this Air in the next day or two ! image

tomwalker-guestlogix commented 2 years ago

I'm in the process of setting up a local Azure agent on my Mac. Right now the Azure hosted agents do not have the latest Xamarin.iOS and Xcode 13. I've noticed that Xamain.iOS capabilities was not listed for my local agent. So I had to manual add in the capability. Does any one know what the value I need to set? I have the 15.0.0.6 packaged installed using the defaults.

I cheated and copied the value from Xamarin.Android and just replaced Android with iOS. My Xamarin.iOS value is set to

/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/Version

Not sure if this is something the Xamarin.iOS sdk needs to send to the Azure agent capabilities process when you are setting up a local agent. I did notice the setup tries to determine your local dev capabilities and uses that setup for the Azure agent. For some reason it was not setting the Xamarin.iOS during that process.

Edward472 commented 2 years ago

Fix resolves the issue of not being able to debug on a simulator, but I still can't debug/release on a physical device.

ahoke-cr commented 2 years ago

@sencagri I was still able to create an Archive by building against my Mac build host with Xamarin iOS SDK 14.0.0.26, though my Simulator has not been working. I am downloading 15.0.0.6 to see if it fixes my Simulator connection, though.

ahoke-cr commented 2 years ago

Upon installing 15.0.0.6 on my remote Mac build host I am no longer able to connect from Visual Studio (2019 v 16.11.3) on my Windows dev machine. Was anyone able to install 15.0.0.6 and still connect to a remote Mac build host from Windows Visual Studio?

ShadowOfPhantom commented 2 years ago

Xamarin ios 15.0.0.6, iOS 15, listviews are a bit under their normal location. I found this issue on only iOS 15 devices/simulators. Take a look: image

ahoke-cr commented 2 years ago

@ShadowOfPhantom check out this SO question. It may help.

ShadowOfPhantom commented 2 years ago

@ShadowOfPhantom check out this SO question. It may help.

Thanks! 🙏

thefex commented 2 years ago

Please fix bindings library. For some reason EnumsAndStructs are not working properly (ObjcBindingCoreSource) -> compiler treats this like it does not exists. Reproduction: add [Native] public enum SomeEnum : long { One, Two }

ghost commented 2 years ago

Hello, I've downloaded the xamarin.ios-15.0.0.6.pkg, newest Xcode. When using Simulators everything is perfect, but when I'm trying to deploy it to my physical iPhone it says "Xamarin.iOS does not support running or debugging the previous built version of your project. Please ensure your solution builds before running or debugging it." Now, I checked that my iPhone version matches my target version (it does). Please let me know if you find any solution. Thanks🙏

ShadowOfPhantom commented 2 years ago

Hello, I've downloaded the xamarin.ios-15.0.0.6.pkg, newest Xcode. When using Simulators everything is perfect, but when I'm trying to deploy it to my physical iPhone it says "Xamarin.iOS does not support running or debugging the previous built version of your project. Please ensure your solution builds before running or debugging it." Now, I checked that my iPhone version matches my target version (it does). Please let me know if you find any solution. Thanks🙏

I'm not sure but try to delete previous version of your app from your device

ghost commented 2 years ago

Hello, I've downloaded the xamarin.ios-15.0.0.6.pkg, newest Xcode. When using Simulators everything is perfect, but when I'm trying to deploy it to my physical iPhone it says "Xamarin.iOS does not support running or debugging the previous built version of your project. Please ensure your solution builds before running or debugging it." Now, I checked that my iPhone version matches my target version (it does). Please let me know if you find any solution. Thanks🙏

I'm not sure but try to delete previous version of your app from your device

Hi, thanks for the reply, I never installed it on my iPhone so there are not older versions ..

rmaxtedimpero commented 2 years ago

@davidortinau I probably shouldn't tag you on here; Having said that, as you have a senior position I feel you are the man to answer this question. Is there an ETA on the release of Xcode 13 (support on visual studio for Mac) + iOS15 (working correctly on real devices). Please let me know or anyone else that has this answer, I would be eternally grateful. Kind regards, Rob.

sencagri commented 2 years ago

Just installed XCode 12.5.1. Everything is fine.

mrwcjoughin commented 2 years ago

Sencagri the issue is to target iOS15 we have to have Xcode 13 - and Xcode 13 is not officially supported by either visual studios yet. There has been a dmg released above to add this support to vs for mac with mixed results…

On Tue, 28 Sep 2021 at 10:31, sencagri @.***> wrote:

Just installed XCode 12.5.1. Everything is fine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-macios/issues/12778#issuecomment-928974876, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOGERTXT5ME5UOCRLCHSH3UEF4O3ANCNFSM5EMPNG4A .

-- Thanks,

Matthew Joughin Founder / CTO

+27 81 529 7169 http://www.adaptableapps.net

jdinnen commented 2 years ago

When I go to Xcode 13, and look at my Devices and Simulators, I can see Simulators for iOS 13, 14 and 15. I do not see iOS14 simulators listed when I use 15.0.0.6 with Xcode 13 in Visual Studio for Mac. I do see the iOS 13 and 14 emulators though with Xcode 12 .5.1 with the latest stable 14.20.0.x in Visual Studio for Mac. Do I need to completely remove Xcode and all the simulators for 15.0.0.6 to be able to see iOS14? Im kinda in a situation where I need to debug one app with iOS15 issues and another on iOS 14. I worry that this almost final versions kills my iOS14 simulators.

dalexsoto commented 2 years ago

15.0.0.6 doesn't allow me to deploy to a real device, but simulators work fine.

/Library/Frameworks/Xamarin.iOS.framework/Versions/15.0.0.6/SDKs/Xamarin.WatchOS.sdk/include/xamarin/runtime.h:252:8: note: candidate function not viable: cannot convert argument of incomplete type 'MonoException *' (aka '_MonoException *') to 'MonoObject *' (aka '_MonoObject *') for 1st argument
void                    xamarin_process_managed_exception (MonoObject *exc);```

image

@fekberg Please file a new issue with the details!

dalexsoto commented 2 years ago

Fix resolves the issue of not being able to debug on a simulator, but I still can't debug/release on a physical device.

@Edward472 Please file a new issue with the details!

dalexsoto commented 2 years ago

Please fix bindings library. For some reason EnumsAndStructs are not working properly (ObjcBindingCoreSource) -> compiler treats this like it does not exists. Reproduction: add [Native] public enum SomeEnum : long { One, Two }

@thefex you need to use the ObjcBindingApiDefinition and also make sure that Process enums as bindings instead of external types is checked in your project settings

image

dalexsoto commented 2 years ago

When I go to Xcode 13, and look at my Devices and Simulators, I can see Simulators for iOS 13, 14 and 15. I do not see iOS14 simulators listed when I use 15.0.0.6 with Xcode 13 in Visual Studio for Mac. I do see the iOS 13 and 14 emulators though with Xcode 12 .5.1 with the latest stable 14.20.0.x in Visual Studio for Mac. Do I need to completely remove Xcode and all the simulators for 15.0.0.6 to be able to see iOS14? Im kinda in a situation where I need to debug one app with iOS15 issues and another on iOS 14. I worry that this almost final versions kills my iOS14 simulators.

@jdinnen If you are using Xcode 13, open it and go to Settings > Components and install the simulators that you are missing

image

dalexsoto commented 2 years ago

@davidortinau I probably shouldn't tag you on here; Having said that, as you have a senior position I feel you are the man to answer this question. Is there an ETA on the release of Xcode 13 (support on visual studio for Mac) + iOS15 (working correctly on real devices). Please let me know or anyone else that has this answer, I would be eternally grateful. Kind regards, Rob.

All I can say is that the mentioned build is coming really soon now to VSMac near you! I will post it here once it becomes available.

jdinnen commented 2 years ago

When I go to Xcode 13, and look at my Devices and Simulators, I can see Simulators for iOS 13, 14 and 15. I do not see iOS14 simulators listed when I use 15.0.0.6 with Xcode 13 in Visual Studio for Mac. I do see the iOS 13 and 14 emulators though with Xcode 12 .5.1 with the latest stable 14.20.0.x in Visual Studio for Mac. Do I need to completely remove Xcode and all the simulators for 15.0.0.6 to be able to see iOS14? Im kinda in a situation where I need to debug one app with iOS15 issues and another on iOS 14. I worry that this almost final versions kills my iOS14 simulators.

@jdinnen If you are using Xcode 13, open it and go to Settings > Components and install the simulators that you are missing

image

Yes; I can even launch the ios14 devices from XCode 13, the 14.5 simulators are installed but I cannot use them on Visual Studio for Mac with 15.0.0.x.

RTchakmakian commented 2 years ago

I'm having problems with async await methods, anyone else?

VS 8.10.9 (Build 3), Xamarin latest version

ShadowOfPhantom commented 2 years ago

I'm having problems with async await methods, anyone else?

Any details?

RTchakmakian commented 2 years ago

I'm having problems with async await methods, anyone else?

Any details?

The routine stop in: await Task.Run(() => (method));

GreatBarrier86 commented 2 years ago

I'm having problems with async await methods, anyone else?

Any details?

The routine stop in: await Task.Run(() => (method));

Does the code within Task.Run() actually execute, or does it not even get that far?

RTchakmakian commented 2 years ago

Without Task.Run() works fine, but de screen doesn't load the numbers.

fekberg commented 2 years ago

Without Task.Run() works fine, but de screen doesn't load the numbers.

Did this work prior to upgrading to Xcode 13?

RTchakmakian commented 2 years ago

Without Task.Run() works fine, but de screen doesn't load the numbers.

Did this work prior to upgrading to Xcode 13?

Yes! Now i'm using Visual Studio 8.10.9 (Build 3), Xamarin latest version and Xcode 13.

rmaxtedimpero commented 2 years ago

@davidortinau I probably shouldn't tag you on here; Having said that, as you have a senior position I feel you are the man to answer this question. Is there an ETA on the release of Xcode 13 (support on visual studio for Mac) + iOS15 (working correctly on real devices). Please let me know or anyone else that has this answer, I would be eternally grateful. Kind regards, Rob.

All I can say is that the mentioned build is coming really soon now to VSMac near you! I will post it here once it becomes available.

Thanks, I appreciate it

thefex commented 2 years ago

@dalexsoto Thanks started to work when I removed [Native] flags on enums and removed ObjCBindingCoreSource You should document this changes as they are breaking changes though

RTchakmakian commented 2 years ago

🚨 Update ⚠️

Hello All!

We have what we believe is the final build for Xcode 13 Support

Thank you for your patience!

The macios team!

~Apple released Xcode 13.0 on September 20, 2021 we are working to get our Xcode 13 support release out in the meantime if you use Xamarin we recommend you to not upgrade to Xcode 13 just yet and keep using Xcode 12.5.~

~If you updated to Xcode 13, you have 3 options:~

  1. ~You can download Xcode 12.5 from the downloads page in the Apple Developer Portal and continue to use it.~
  2. ~If you need to keep Xcode 13 but want to use our current stable d16-10 bits you will need to install the following in you macOS machine~

  3. ~Use a build from our xcode13-ios 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.~

~Thank you for your patience!~

~The macios team!~

I'm having problems with async await methods, without Task.Run() works fine, but de screen doesn't load the numbers.

I'm using Visual Studio 8.10.9 (Build 3), Xamarin latest version and Xcode 13.

ShenbagaPriya22 commented 2 years ago

Getting below error in our test projects with Xamarin.ios 15.0.0.6, Xcode 13. Added '-v -v -v -v' to the mtouch arguments and got this error details. Any help would be appreciated.

error MT2001: Could not link assemblies. Reason: Object reference not set to an instance of an object 1> (TaskId:144) 1> --- inner exception (TaskId:144) 1> System.NullReferenceException: Object reference not set to an instance of an object (TaskId:144) 1> at MonoTouch.Tuner.RegistrarRemovalTrackingStep.EndProcess () [0x0009f] in /Users/builder/azdo/_work/1/s/xamarin-ma 1> cios/tools/linker/RegistrarRemovalTrackingStep.cs:188 (TaskId:144) 1> at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00040] in /Users/builder/azdo/_work/1/s/ 1> xamarin-macios/builds/mono-ios-sdk-destdir/ios-sources/external/linker/src/linker/Linker.Steps/BaseStep.cs:63 (TaskI 1> d:144) 1> at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000f] in /U 1> sers/builder/azdo/_work/1/s/xamarin-macios/builds/mono-ios-sdk-destdir/ios-sources/external/linker/src/linker/Linker/ 1> Pipeline.cs:134 (TaskId:144) 1> at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00011] in /Users/builder/azdo/_work/1/s/xamari 1> n-macios/builds/mono-ios-sdk-destdir/ios-sources/external/linker/src/linker/Linker/Pipeline.cs:126 (TaskId:144) 1> at MonoTouch.Tuner.Linker.Process (Mono.Linker.Pipeline pipeline, MonoTouch.Tuner.MonoTouchLinkContext context) [0x 1> 00002] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/Tuning.cs:31 (TaskId:144) 1> --- (TaskId:144) 1> at MonoTouch.Tuner.Linker.Process (Mono.Linker.Pipeline pipeline, MonoTouch.Tuner.MonoTouchLinkContext context) [0x 1> 00020] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/Tuning.cs:36 (TaskId:144) 1> at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& con 1> text, System.Collections.Generic.List1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x000de] in /Users/builder/azdo/ 1> _work/1/s/xamarin-macios/tools/mtouch/Tuning.mtouch.cs:61 (TaskId:144) 1> at Xamarin.Bundler.Target.LinkAssemblies (System.Collections.Generic.List1[Mono.Cecil.AssemblyDefinition]& assembl 1> ies, System.String output_dir, System.Collections.Generic.IEnumerable1[T] sharedCodeTargets) [0x00256] in /Users/bui 1> lder/azdo/_work/1/s/xamarin-macios/tools/mtouch/Target.mtouch.cs:517 (TaskId:144) 1> at Xamarin.Bundler.Target.ManagedLink () [0x00719] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtouch/Tar 1> get.mtouch.cs:666 (TaskId:144) 1> at Xamarin.Bundler.Target.ProcessAssemblies () [0x000c2] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtou 1> ch/Target.mtouch.cs:869 (TaskId:144) 1> at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools 1> /mtouch/Application.mtouch.cs:927 (TaskId:144) 1> at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtou 1> ch/Application.mtouch.cs:363 (TaskId:144) 1> at Xamarin.Bundler.Application+<>c.<BuildAll>b__44_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/az 1> do/_work/1/s/xamarin-macios/tools/mtouch/Application.mtouch.cs:311 (TaskId:144) 1> at System.Collections.Generic.List1[T].ForEach (System.Action`1[T] action) [0x0001e] in <36514b14425c4337b446653c5 1> 47aa9c3>:0 (TaskId:144) 1> at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtouch/A 1> pplication.mtouch.cs:311 (TaskId:144) 1> at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00413] in /Users/builder/azdo/_work/1/s/xamarin-macios/to 1> ols/mtouch/mtouch.cs:681 (TaskId:144) 1> at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0001b] in /Users/builder/azdo/_work/1/s/xamarin-macios/too 1> ls/common/Driver.cs:52 (TaskId:144) 1> Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch execution finished. (TaskId:144) 1> MTouch: 2021-09-28T19:39:58.2390359+05:30 - Finished (TaskId:144) 1>Done executing task "MTouch" -- FAILED. (TaskId:144)

RakeshRaul commented 2 years ago

Hi Team, We have Xamarin forms application. After XCode upgrade from 12.5 to 13.1 we are not able to see iOS simulators on VS 2019. Next we have upgraded and install package -xamarin.ios-15.0.0.6.pkg as mention in this block. Now we are able to see simulators but it leads to some other issues in Xamarin forms iOS app.