-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] iOS - "Exception of type 'Foundation.You_Should_Not_Call_base_In_This_Method' was thrown." #29
Comments
We are currently discussing this issue in #27. |
Oki, for those interested. The issue is in: https://github.com/Laerdal/Laerdal.Dfu.Bindings.iOS/tree/master @schneifa @framinosona @ksidirop-laerdal #27 I re-did the bindings locally, so if anyone that maintain the project and would like to check the changes below and also update all the native binding and references, that would make people happy.
b. Protocols, there are only 4 of them. I've left the [BaseType][Protocol][Model]
att. |
Thank you for the work @WanftMoon !!!! Hopefully the local project is updated soon :) |
@WanftMoon thanks for your insights. I don't think it fully applies here, as AppDefinition.cs here is different from the one in Laerdal.Dfu.Bindings.iOS. And thanks @framinosona for sharing this work, extremely useful to me.
I stumbled today on another problem (undefined symbol for the ios Nordic functions). I solved it by changing the path of the framework dependencies and make them point to the arm64 framework in the Carthage folder. I hope this might help. Too many changes to make a PR but I'll be happy to share my work if asked. |
Hi, I have tried to remove the "[Model]" attribute but same error : "Foundation.You_Should_Not_Call_base_In_This_Method". Can you provide a patch or help please ? |
if you are re-doing the native binding: just make sure you edit your api definition file as follows: a. Interfaces just need the BaseType (the exception reported was because there were [Model] everywhere which generates a model with no code besides the exception being thrown
b. Protocols, there are only 4 of them. I've left the [BaseType][Protocol][Model]
|
That's what I did but I got the same error :
Here is my modified ApiDefinition.cs, do you see anything that I forgot ? https://gist.github.com/neicureuil/d2893c384437422c5a4f1c6bbb20f677 |
Looking at your file, you didn't. You have several classes that maps the sdk interfaces marked as protocol.
|
Thanks for your help, it was a nuget cache issue.
It seems that the native lib isn't loaded. Do you have any idea why I get this error ? |
You might want to check that the xcframework is being copied to the correct location (referencing the ios native binding in your ios project might help). |
It's work now ! Thank you for your help, you save me ! |
Any chance you could share the updated Nuget Package with me? I do not have any experience on building or editing NuGet Packages, so I am still waiting on an update to the master Nuget. |
Detected package downgrade: Laerdal.Dfu.Bindings.iOS from 4.13.0.43857 to 4.13.0.88. Reference the package directly from the project to select a different version. Getting this message when trying to add a newly built iOS Bindings Library to my app to replace the 4.13.0.43857 version that Laerdal.Dfu 1.27.8 relies on |
Don't use both, since you build a native binding, you will need to do the same with the wrapper (laerdal.dfu). Just get Laerdal.Dfu code, add it to the solution, then update the references. |
Guess I am a bit confused. I cloned both the Laerdal.Dfu Library and the iOS Binding Library. I updated the Bindings Library to use your changes. How would I then rebuild the Laerdal.Dfu Nuget to use the updated bindings library I made? Sorry a bit new to this and normally just use third party sources since I am super fresh to C# |
Just edit the csproj of the Laerdal.Dfu to reference your bindings.
And don't use the published nuget, just reference your local projects |
Okay thanks. I see the current package version of the cloned Laerdal Dfu project is 0.0.2. Did this need any change since the latest Nuget is 1.27.8 or can that just stay the same Also, got this when referencing the csproj library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1982,5): warning : The referenced project 'Users/isspro/Documents/GitHub/nuget_repo/Laerdal.Dfu.Bindings.iOS/Laerdal.Dfu.Bindings.iOS/Dfu.Bindings.iOS.csproj' does not exist. [/Users/isspro/Documents/GitHub/nuget_repo/Laerdal.Dfu/Laerdal.Dfu/Laerdal.Dfu.csproj] |
|
@WanftMoon What branch did you use? I had been on the main branch and am now seeing it is not even updated for .NET 7 which is what I am using. Is the develop branch the one that you used? |
My project is xamarin forms. |
Has anyone had any luck with the newer release of the nuget in fixing this issue or still on going? |
Hi, we've had a bit of time this morning to work on this. Can you guys test https://www.nuget.org/packages/Laerdal.Dfu/1.27.62 ? |
@framinosona Still getting the error: Foundation.You_Should_Not_Call_base_In_This_Method: Exception of type 'Foundation.You_Should_Not_Call_base_In_This_Method' was thrown. It looks like you need to still remove the Model form the Interfaces in the Laerdal.Dfu.Bindings.iOS. It looked like you removed them, but then you re added them in |
…ddress the native errors that users report under iOS #29 (comment)
Describe the bug
Project in xamarin forms with ble.net, when calling start in iOS, the following exception is thrown:
"Exception of type 'Foundation.You_Should_Not_Call_base_In_This_Method' was thrown."
obs: Need guidance in case i'm missing something to setup the dfu correctly in iOS, because the same exception is not happening in Android. The process starts ok
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The install to start like it does in Android.
Screenshots
N/A
Desktop (please complete the following information):
-- ble.net 1.2.1
-- Laerdal.Dfu 1.27.2-xamarin-10.45630
-- Xamarin.Essentials - 1.8.1
-- Xamarin.Forms - 5.0.0.2622
Smartphone (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: