飘金

Results 11 comments of 飘金

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);". ![image](https://user-images.githubusercontent.com/10163672/82121693-87243200-97c1-11ea-82c7-8eea920aefc9.png)

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. ![image](https://user-images.githubusercontent.com/10163672/82136700-e37b6600-9842-11ea-9852-ff66392ff531.png)

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. ![image](https://user-images.githubusercontent.com/10163672/82154431-739bc880-98a0-11ea-904f-fd4679f51367.png)

> 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! #...