Post

Replies

Boosts

Views

Activity

Is NSNetService between a Mac and iOS device over Bluetooth only (WiFi off) possible?
I'm trying to sort out the system/hardward requirements for using Bonjour/NSNetService to connect an iPhone to a Mac.Are these combinations possible:[?] Bluetooth ON, WiFi OFF on Mac and iPhone[?] Bluetooth OFF, WiFi ON on Mac and iPhone, but both devices are not part of any WiFi network (i.e. no router present)[✓ Works] Bluetooth OFF, WiFi On, Mac and iPhone part of the same WiFi networkI got a Bluetooth-only NSNetService up and running between an iPhone and an iPad, but never with a Mac (MacBook Pro mid-2012). Is this a hardware issue or is it not possible to connect an iPhone and a Mac through Bluetooth alone?Thanks!PS: I set includesPeerToPeer = true for the service and browser. My code is based on the WiTap sample code.
9
0
5k
Feb ’16
Starting with iOS 13, opening a file in iCloud fails with: Code=256 "The file couldn’t be opened."
Starting with iOS 13 I'm receiving error reports from users that cannot open their iCloud documents anymore. The error is each time: Error Domain=NSCocoaErrorDomain Code=256 "The file “Untitled.txt” couldn’t be opened." UserInfo={NSURL=file:///private/var/mobile/Library/Mobile%20Documents/iCloud~com~myapp/Documents/Untitled.txt}Code 256 means: NSFileReadUnknownErrorRestarting the device solves the problem each time, but I get a lot of error reports. My app does check the availability of iCloud documents (it uses file coordination and UIDocument). This used to work fine before iOS 13.Has anybody seen a similar issue? What could be causing this and how could I collect more useful debug information to get to the bottom of this?
2
0
2.2k
Dec ’19
SearchKit: How to update index after document was moved?
I'm writing a Swift wrapper for Search Kit and ran into a problem. Let's say I have indexed a single document: /documents/hello.txt Now the user moves the document to another folder: /notes/hello.txt How can I update the index after a document was moved without having to re-index the document? There is SKIndexMoveDocument(), but it requires a new parent SKDocument. How would I get a reference to that? I tried creating it via SKDocumentCreateWithURL, but updating the index fails. I assume, because there is no document with the path "/notes/" in the index (it's a folder after all)? The SearchKit Programming Guide says that when moving a document, one should remove the old document from the index and add it again with the new URL. There has to be a better way without having to reindex. Imagine renaming the root folder of a large document tree. Re-indexing all files would be unnecessary if only their URLs changed.
0
0
548
Jul ’20