Post

Replies

Boosts

Views

Created

MetricKit: Custom Metrics signposts
Hi, I'm using mxSignpost() to post custom metrics for my iOS app and I'm subscribing for receiving metric payloads, but I'm not seeing my custom signposts in the payloads. I'm only seeing the standard metrics in the payloads. If I simulate payloads in Xcode, I see the fake signposts that are generated by the simulation. I've confirmed using breakpoints that I'm calling mxSignpost() and I've exercised the paths that to trigger the signposts. Is there any way to see what MetricKit has logged? Otherwise, I have to wait 24 hours to see the posted payloads. I'm testing on iPhone 8 running iOS 13.6. Thanks, Tom
3
0
1.9k
Aug ’20
IOUSBHostDevice: Exclusive open of usb object failed
I have a command line tool and am trying to connect to a USB device using:    _device = [[IOUSBHostDevice alloc] initWithIOService:_service    options:IOUSBHostObjectInitOptionsDeviceCapture    queue:_queue    error:&error    interestHandler:^(IOUSBHostObject * _Nonnull hostObject, uint32_t messageType, void * _Nullable messageArgument) {     NSLog(@"Interest handler...");    }]; However, when I run this tool (even under sudo), I'm hitting the error: Error:Unable to open io\_service\_t object and create user client. with reason: Exclusive open of usb object failed. The documentation for IOUSBHostObjectInitOptionsDeviceCapture implies that using this option and having root privilege should gain exclusive access to the device. The alternative is to use an entitlement, but the executable is terminated immediately in that case probably due to code signing. I would have expected that running the tool under sudo would have been sufficient to avoid this issue. I just want to first get things working locally on my Mac for a proof of concept, so I don't really want to deal with code signing up front unless that is absolutely necessary. What do I need to do to get exclusive access to the USB device? Thanks in advance.
5
0
3.4k
Oct ’20
SwiftUI Table with copy
I've implemented a macOS app that displays a table of records in a document using SwiftUI. However, I want to allow the user to copy selected records. I've tried adding onCopyCommand, but I'm not seeing Edit -> Copy enabled.     HSplitView {     Table(records, selection: $selectedRecordIDs) {      TableColumn("Timestamp", value: \.timestamp.description)      TableColumn("Message", value: \.message)       .width(ideal: columnWeight.message * geometry.size.width)     }     .onCopyCommand {      [NSItemProvider(item: "Hello, World!" as NSString, typeIdentifier: UTType.plainText.identifier)]     } How to enabled Copy? Thanks.
2
0
1.5k
May ’22
CoreBluetooth - peripheral's services missing
I'm hitting an issue with a connected peripheral that was discovered with BLE when that peripheral also happens to be classic BT paired. If that peripheral is not classic BT paired, there is no issue. When calling discoverServices([serviceCBUUID]) the peripheral delegate peripheral:didDiscoverServices: is called without error, but peripheral.services is empty whenever the peripheral happens to also be classic BT paired. How can it be possible to get a callback that services where discovered, yet the peripheral has no services when queried in that callback? Is this a known issue with a workaround? Thanks.
0
0
713
Jun ’22
MetricKit: Custom Metrics signposts
Hi, I'm using mxSignpost() to post custom metrics for my iOS app and I'm subscribing for receiving metric payloads, but I'm not seeing my custom signposts in the payloads. I'm only seeing the standard metrics in the payloads. If I simulate payloads in Xcode, I see the fake signposts that are generated by the simulation. I've confirmed using breakpoints that I'm calling mxSignpost() and I've exercised the paths that to trigger the signposts. Is there any way to see what MetricKit has logged? Otherwise, I have to wait 24 hours to see the posted payloads. I'm testing on iPhone 8 running iOS 13.6. Thanks, Tom
Replies
3
Boosts
0
Views
1.9k
Activity
Aug ’20
IOUSBHostDevice: Exclusive open of usb object failed
I have a command line tool and am trying to connect to a USB device using:    _device = [[IOUSBHostDevice alloc] initWithIOService:_service    options:IOUSBHostObjectInitOptionsDeviceCapture    queue:_queue    error:&error    interestHandler:^(IOUSBHostObject * _Nonnull hostObject, uint32_t messageType, void * _Nullable messageArgument) {     NSLog(@"Interest handler...");    }]; However, when I run this tool (even under sudo), I'm hitting the error: Error:Unable to open io\_service\_t object and create user client. with reason: Exclusive open of usb object failed. The documentation for IOUSBHostObjectInitOptionsDeviceCapture implies that using this option and having root privilege should gain exclusive access to the device. The alternative is to use an entitlement, but the executable is terminated immediately in that case probably due to code signing. I would have expected that running the tool under sudo would have been sufficient to avoid this issue. I just want to first get things working locally on my Mac for a proof of concept, so I don't really want to deal with code signing up front unless that is absolutely necessary. What do I need to do to get exclusive access to the USB device? Thanks in advance.
Replies
5
Boosts
0
Views
3.4k
Activity
Oct ’20
Not receiving MetricKit Signposts
I'm posting signposts using the mxSignpost(...) calls. My MXMetricManagerSubscriber is receiving standard metrics, but never my signposts. Is this a known bug? If not, what could be causing them to be missing? My iPhone is running iOS 14.4. Thanks, Tom
Replies
1
Boosts
0
Views
1.9k
Activity
Feb ’21
SwiftUI Table with copy
I've implemented a macOS app that displays a table of records in a document using SwiftUI. However, I want to allow the user to copy selected records. I've tried adding onCopyCommand, but I'm not seeing Edit -> Copy enabled.     HSplitView {     Table(records, selection: $selectedRecordIDs) {      TableColumn("Timestamp", value: \.timestamp.description)      TableColumn("Message", value: \.message)       .width(ideal: columnWeight.message * geometry.size.width)     }     .onCopyCommand {      [NSItemProvider(item: "Hello, World!" as NSString, typeIdentifier: UTType.plainText.identifier)]     } How to enabled Copy? Thanks.
Replies
2
Boosts
0
Views
1.5k
Activity
May ’22
CoreBluetooth - peripheral's services missing
I'm hitting an issue with a connected peripheral that was discovered with BLE when that peripheral also happens to be classic BT paired. If that peripheral is not classic BT paired, there is no issue. When calling discoverServices([serviceCBUUID]) the peripheral delegate peripheral:didDiscoverServices: is called without error, but peripheral.services is empty whenever the peripheral happens to also be classic BT paired. How can it be possible to get a callback that services where discovered, yet the peripheral has no services when queried in that callback? Is this a known issue with a workaround? Thanks.
Replies
0
Boosts
0
Views
713
Activity
Jun ’22