hi all - ive used xam before across mobile devices extensively but this is my first foray into macOS and im usually a win user... im looking for a little advice on debugging binding issues.
Im trying to leverage embedded chrome/ CEF.framework using CefGlue via xam.mac or .net core but im having very little luck getting examples to work always for the same reason - cant find the native cef library at runtime.
ive traweled docs and i feel like i am doing everything correctly. i then came across this - https://stackoverflow.com/questions/47538368/how-to-properly-map-an-expected-dll-name-to-a-native-mac-framework-for-mono
i found this person who was having similiar issues and they mentioned a "lib" appending issue. so i experimented and was finally able to get past the .dll load by renaming "chromeinium embedded framework.framework/chromeinium embedded framework" to "../liblibcef", but fails soon after because it cant find other expected framework/bundle files that are located in "chromeinium embedded framework.framework/Resources". im assuming there is a proper way to achieve this linking that i just cant work out is. is there a config i need to update to provide the mapping? (<dll import= ?).
cefglue binds using this approach:
[DllImport("libcef", EntryPoint = "cef_initialize", CallingConvention = libcef.CEF_CALL)]
public static extern int initialize(cef_main_args_t args, cef_settings_t settings, cef_app_t* application);
looking for suggestions / links that will help me down the right path on setting up these native ".framework" references? i would like to generate my own in future using sharpie so i want to fully understand the mechanics here.
is using something like dtrace/opensnoop the right approach to debugging these load failures (wasnt highlighting the probing paths for me :| )?
NSInvalidArgumentException: *** -streamStatus only defined for abstract class. Define -[System_Net_Http_NSUrlSessionHandler_WrappedNSInputStream streamStatus]!. Has any of you seen anything like that before?
(NSWindow) ObjCRuntime.Runtime.GetNSObject (ptr)
ptr == IntPtr.Zero, in which case it'll return null
ok thanks for this info- i didnt know if what i was trying todo was legal. the handle i am passing definitely looks valid in the debugger - this is the callback code
i'll keep hacking at it.
yeh i did - but i am doing it a little later in the app bootstrapper to allow CEF to startup correctly if needs be (its a multi-process architecture that executes the host process multiple times with different commandline args and can timeout if not snappy). Could that effect Init()?
It seems like its on the correct thread to me; im doing the work in the create handler, and if i throw at that point,I can see the .dynlib createWindow in the stack. Cef has its own methods to call on the UI thread, could also try them.
/Users/fmoraes/Projects/TestApp/TestApp.Mac/TestApp.Mac.csproj(101,11): error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" was not found. Also, tried to find "Xamarin/Mac/Xamarin.Mac.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" and "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild" . These search paths are defined in "/Users/fmoraes/Library/Caches/VisualStudio/8.0/MSBuild/35979_1/MonoDevelop.MSBuildBuilder.exe.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.