uidocument

Having Trouble Getting the UIDocumentBrowserController to open docs in a Document based app

馋奶兔 提交于 2019-12-03 15:14:00
I've been working on a new Document-based app, and was super glad about the new UIDocumentBrowserController...trying to roll my own solution for the document browser UI was tricky! I'm having some trouble getting the browser to open documents after they've been created. What happens now is that when I choose to create a new document in the document browser, the document is created and opened as expected, although an error message is logged. However, after the doc is closed, I cannot reopen the file, either immediately or upon subsequent launches, even though the document is displayed. However,

ios iphone hooks open instagram directly without showing UIDocumentInteractionController

时光怂恿深爱的人放手 提交于 2019-12-03 12:56:14
I'm integrating sharing images through instagram in my app. I've read their documentation . It seems that I need to use the iOS UIDocumentInteractionController to allow this (I understand that it allows access to files in my app's sandbox). Digging deeper, I came across this library which makes things very straightforward. The problem I have with it is that it presents the action sheet (which only has one button - Instagram...) How can I use the instagram hooks , with the UIDocumentInteractionController without showing the action sheet. I came across this question which is pretty much the same

iOS5.1: synchronising tasks (wait for a completion)

末鹿安然 提交于 2019-12-03 08:14:17
I have a basic problem synchronizing openWithCompletionHandler: (UIManagedDocument) with the main activities. Situation: I have a singleton class managing a shared UIManagedDocument. This class provides one method which should deliver the document in a normal state (i.e. creates or opens it, whatever is neccessary). But because openWithCompletionHandler: does its main job asynchronously in the background my program should wait with setting up the fetchedResultsController until the document is really open. The "viewWillAppear" method (currently) produces no useful output when the database is

UIDocument Creation on iOS 11: reader is not permitted to access the URL

☆樱花仙子☆ 提交于 2019-12-03 05:55:19
Since iOS 11 I have encountered the following error every time I am creating a new document using UIDocument API: [ERROR] Could not get attribute values for item /var/mobile/Containers/Data/Application/XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX/Documents/myDoc-XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX.myFile (n) . Error: Error Domain=NSFileProviderInternalErrorDomain Code=1 "The reader is not permitted to access the URL." UserInfo={NSLocalizedDescription=The reader is not permitted to access the URL.} Unlike similar questions ( 1 , 2 , 3 ) on SO on this, I am not using UIDocumentBrowserViewController . I am

Xcode 9.2 UIDocumentBrowserViewController : Failed to create a url from bookmarkableString

只谈情不闲聊 提交于 2019-12-02 21:06:59
Update: Xcode 9.3 has fixed it. When creating UIDocument File in UIDocumentBrowserViewController [default] [ERROR] Could not resolve bookmark. Error: Error Domain=NSFileProviderInternalErrorDomain Code=1 "The reader is not permitted to access the URL." UserInfo={NSLocalizedDescription=The reader is not permitted to access the URL.} [DocumentManager] Failed to create a url from bookmarkableString (Error Domain=NSFileProviderInternalErrorDomain Code=1 "The reader is not permitted to access the URL." UserInfo={NSLocalizedDescription=The reader is not permitted to access the URL.}) Code work well

`save(to:for:completionHandler:)` of `UIDocument` crashes

别来无恙 提交于 2019-12-02 10:41:35
问题 I get crash on every 32 bit device / simulator running iOS 9 on save(to:for:completionHandler:) . Xcode 8.2. Base SDK is 10.2. Target is 9.0. Standard architectures. Swift 3. For both develop and release builds. Sample project. Could not find if it's known, neither any related issues. Can you recommend any workaround? Should I require 64 bit architecture? 回答1: The work around is to return NS object, Apple engineer recommended NSMutableData specifically: override func contents(forType typeName

`save(to:for:completionHandler:)` of `UIDocument` crashes

倖福魔咒の 提交于 2019-12-02 03:43:05
I get crash on every 32 bit device / simulator running iOS 9 on save(to:for:completionHandler:) . Xcode 8.2. Base SDK is 10.2. Target is 9.0. Standard architectures. Swift 3. For both develop and release builds. Sample project. Could not find if it's known, neither any related issues. Can you recommend any workaround? Should I require 64 bit architecture? The work around is to return NS object, Apple engineer recommended NSMutableData specifically: override func contents(forType typeName: String) throws -> Any { guard let data = text.data(using: .utf8) else { ... } if #available(iOS 10, *) {

UIDocument & NSFileWrapper Architecture and Performance

折月煮酒 提交于 2019-11-30 13:48:06
We've recently converted our code to use UIDocument instead of manipulating files on the file system directly, and we've encountered some performance issues as a result. We are wondering whether we are using this class incorrectly, if anyone else had these issues, and what are the common ways to address them. Our app We have a "shoebox app" that manages a bunch of documents, each consisting of multiple image files that can be quite heavy, a small metadata file and a small preview image. The user may have many documents on her device (1000+ documents). Each document's files are grouped in an

iCloud Documents not visible

戏子无情 提交于 2019-11-30 13:18:45
问题 I am trying to use iCloud Documents to store XML files from my iOS App. Everything seems to be working fine (I can write and read files without errors) except my App's files do not show up in iCloud Documents neither in icloud.com nor in developer.icloud.com nor on my Windows PC in iCloud Drive folder. I was running the app in simulator and tested with TestFlight on a real device. I have the latest version of iCloud for Windows 4.0 installed. The App is created in Xcode 6. Does anyone know

iCloud Documents not visible

浪尽此生 提交于 2019-11-30 06:56:57
I am trying to use iCloud Documents to store XML files from my iOS App. Everything seems to be working fine (I can write and read files without errors) except my App's files do not show up in iCloud Documents neither in icloud.com nor in developer.icloud.com nor on my Windows PC in iCloud Drive folder. I was running the app in simulator and tested with TestFlight on a real device. I have the latest version of iCloud for Windows 4.0 installed. The App is created in Xcode 6. Does anyone know how to make the files appear in iCloud Documents? The code I am using for the saving the file: NSLog(@