Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Missing messaging functions after binding

$
0
0

I created an iOS binding for an objective c library for a bluetooth printer. Everything was seemingly working but the application would crash randomly - I thought it was a memory problem. However, after looking into the issue a little bit further I see that the release port method looks like this:

[Export ("releasePort:", CompilerGenerated]
public static void ReleasePort (SMPort port)
{
    if(port == null)
{
throw new ArgumentNullException ("port");
}

Messaging.void_objc_msgsend_IntPtr(SMPort.class_ptr, SMPort.selReleasePort.Handle, port.get_Handle());
}

However, in the Messaging class there is no method that corresponds to the above. Therefore, I'm thinking that the function is throwing some kind of Objective-c error. This is all happening in the dll that was built.

Do I have an option of fixing this without rebuilding a new dll?

Also, I have tried to rebuild the dll but I think I am missing a step. I have created a new iOS binding project - added the native library - reran Objective Sharpie and got the bindings - added the bindings - updated my structsandenum file - built the project - (of which I get an error related to _Namespace_Library). When I rebuild this it builds successfully. However, I feel that there is a part that I am missing as the dll that comes from this project is empty.

If I cannot fix this without rebuilding a new dll, how do I go about completing the binding? I have read through the objective-c binding tutorial all to no avail. There was an article done by Pierce that seems to have been taken down that I used when I initially created this dll.

I really appreciate any help.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>