You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to integrate an iOS binding library with a swift library that uses asynchronous methods. When I hit a method that is synchronous, the method executes successfully. When I try to invoke any asynchronous method, the app crashes. The last exception that I see in the logs is "Microsoft.iOS: Unsupported type encoding: "NSString"16@?<v@?@"NSString">24".
Referencing the Binding details for Xamarin,, I'd expect this to be fully supported, but I cannot find a way past this error.
I've been able to reproduce this on both the latest versions of dotnet 6 and dotnet 7.
Steps to Reproduce
Have a swift library that utilizes async code
Create a binding library to that swift library
Attempt to invoke the code from your app - it will crash
publicpartialasyncTask<string>DebugLog(stringmessage){vartestClass=new TestClass();// This works
Console.WriteLine("Printing first message");
Console.WriteLine($"ECHO: {testClass.DebugLogWithMessage(message)}");// This does not (Microsoft.iOS: Unsupported type encoding: "NSString"16@?<v@?@"NSString">24)
Console.WriteLine("Printing second message");
Console.WriteLine($"ECHO: {await testClass.DebugLog2WithMessageAsync(message)}");return"";}
@jerrgreen I can't transfer issues from one org to another, but I think this issue should go to xamarin-macios, it's specific to the iOS SDK and not something that can be fixed in this repo.
If you try running your framework inside a net7.0-ios app, without invoking the MAUI UI Framework (Which is what this repo is for) you can get the same exception. This is an SDK question or issue that cannot be addressed here. But hopefully, we can figure it out over in that repo.
Description
I am trying to integrate an iOS binding library with a swift library that uses asynchronous methods. When I hit a method that is synchronous, the method executes successfully. When I try to invoke any asynchronous method, the app crashes. The last exception that I see in the logs is "Microsoft.iOS: Unsupported type encoding: "NSString"16@?<v@?@"NSString">24".
Referencing the Binding details for Xamarin,, I'd expect this to be fully supported, but I cannot find a way past this error.
I've been able to reproduce this on both the latest versions of dotnet 6 and dotnet 7.
Steps to Reproduce
Sample from the ApiDefinition:
Sample from the application:
Link to public reproduction project repository
https://github.com/jerrgreen/MauiIosAsync
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.2
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: