Posts

Post not yet marked as solved
1 Replies
488 Views
I am using the NSPersistentCloudKitContainer for my app's core data. This works well enough on a single device. However, (using the same Apple ID) when I run my app on a second device, the data on cloud kit is ignored. What is the magic code needed to pull the cloud kit data into my app's core data store?
Posted Last updated
.
Post not yet marked as solved
0 Replies
563 Views
Since "The "out-of-the-box" implementation of CoreData / CloudKit sync does not, and will not, store any records in the Public database" how does one go about storing records in the public database (when I look using the CloudKit dashboard, there are only private records, nothing in public)? I know about setting databaseScope = .public in NSPersistentCloudKitContainerOptions, and about assigning freshly created managed objects to the appropriate scope (needed because my app has more than one). What else do I need to do to get syncing to work?
Posted Last updated
.
Post not yet marked as solved
1 Replies
642 Views
The recent upgrade of the Mac OS seems to have removed some of the inspector bar tools from the NSTextView that formerly appears after setting usesInspectorBar to true. I see nothing in the documentation for any API for making these tools reappear. I notice that the TextEdit app's inspector bar is not missing them. Please tell me how to get my app's text view's inspector bar to look and behave like TextEdit.
Posted Last updated
.
Post not yet marked as solved
5 Replies
1.6k Views
i have a usb device and am writing an OS X app which sends it commands. it shows up in the ioRegistry as a IOUSBMassStorageDriver. i want to send it some commands but can't find specific enough information about how to do this. the following code finds a plain vanilla usb driver which apparently is not able to actually deliver my commands to the device. any help is appreciated. a book, a tutorial, sample code, anything which is specific about IOUSBMassStorageDriver let matchingDict = { IOProviderClass : IOUSBDevice, idProduct : 58113, idVendor : 1238 } var matchedIterator:io_iterator_t = 0 var removalIterator:io_iterator_t = 0 let notifyPort:IONotificationPortRef = IONotificationPortCreate(kIOMasterPortDefault) IONotificationPortSetDispatchQueue(notifyPort, DispatchQueue(label: "IODetector")) let matchingCallback:IOServiceMatchingCallback = { (userData, iterator) in // Convert self to a void pointer, store that in the context, and convert it let this = Unmanaged<TLUSBDeviceMonitor>.fromOpaque(userData!).takeUnretainedValue() this.rawDeviceAdded(iterator: iterator) } let removalCallback: IOServiceMatchingCallback = { (userData, iterator) in let this = Unmanaged<TLUSBDeviceMonitor>.fromOpaque(userData!).takeUnretainedValue() this.rawDeviceRemoved(iterator: iterator) } let selfPtr = Unmanaged.passUnretained(self).toOpaque() IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, matchingDict, matchingCallback, selfPtr, &matchedIterator) IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, matchingDict, removalCallback, selfPtr, &removalIterator)
Posted Last updated
.