飘金
飘金
I found "device_monitor" didn't call. The debug code is "USBMUXD_API int usbmuxd_events_subscribe(usbmuxd_subscription_context_t *ctx, usbmuxd_event_cb_t callback, void *user_data)" line "int res = thread_new(&devmon, device_monitor, NULL);". 
I have updated libimobiledevice, libplist, libusbmuxd, openssl and usbmuxd to the lastest version.
@nikias I call usbmuxd_subscribe in the main thread. And I just updated libimobiledevice, libplist, libusbmuxd, openssl and usbmuxd to the lastest version.
@nikias This is MacApp demo. Call usbmuxd_subscribe in applicationDidFinishLaunching. And the callback function "usbmux_event_cb" didn't be called. [MacDemo.zip](https://github.com/libimobiledevice/libusbmuxd/files/4638704/MacDemo.zip)
@nikias I single-step debugging through ```usbmuxd_events_subscribe``` and ```thread_new``` was called. The res is 0. 
I break inside the start line of ```device_monitor```, but the breakpoint didn't come to the start line of ```device_monitor```. ```device_monitor``` didn't be called. 
> Well I guess this is because you are linking in the libraries as static libraries. If you compile shared libraries and use those it will probably work. Thanks, I...
> @piaojin Did you solve this problem? I met it too @Glen-Bai Sorry No.
@Sean1708 Thank you for your suggestion. I will try [cbindgen](https://github.com/eqrion/cbindgen/).
1. 换成cocopod吧! 项目目录下: `pod init` 2. 生成的文件Podfile中输入对应用到的库: ``` target '12306ForMac' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! #...