hey,
I PL/Invoke some functions coming from dnssd like that :
[DllImport("/usr/lib/system/libsystem_dnssd.dylib")]
public static extern DNSServiceErrorType DNSServiceBrowse(out IntPtr sdRef,
DNSServiceFlags flags,
UInt32 interfaceIndex,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]String regtype,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]String domain,
IntPtr callBack,
IntPtr context);
it's working great on the simulator. When I build it on the device I got this exception :
Warning MT3005: The dependency 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' was not found. Please review the project's references. (MT3005) (TestApp)
Warning MT3006: Could not compute a complete dependency map for the project. This will result in slower build times because Xamarin.iOS can't properly detect what needs to be rebuilt (and what does not need to be rebuilt). Please review previous warnings for more details. (MT3006) (TestApp)
Error MT3001: Could not AOT the assembly '/Volumes/Tapstic/P/Devel/Labs/B/testApp/testApp/obj/iPhone/Release/mtouch-cache/Build/TestApp.exe' (MT3001) (TestApp)
The problem is not in mono touch per se, because it only fail when I add my class that include those DllImport.
I suspect that this line is guilty or i need to add that in the references "folder" somehow :
[DllImport("/usr/lib/system/libsystem_dnssd.dylib")]
Actually, It work when I change the linker behavior to "Don't link" in the pref of the project. So, I guess that that mono touch is stripping this lib ... but I have no clue how to tell mono to keep/add libsystem_dnssd.dylib
any idea ?