Posts

Post not yet marked as solved
1 Replies
386 Views
I am on the latest Xcode (14.2). I am building an iPad app to run natively on Apple Silicon Mac using "Designed for iPad". Recently I realized that on every build, Xcode creates a brand new binary in "/DerivedData/MyApp-xxxxxxxxxxxx/Build/Products/Debug-iphoneos/.XCInstall/". They are named: MyApp, MyApp1, MyApp2,....MyApp300, etc.... I am pretty sure this is something recent. Those files are easy to get rid of but it is still a bit annoying. Anybody seeing this? Anyway to stop this?
Posted
by hlx.
Last updated
.
Post not yet marked as solved
1 Replies
957 Views
I am trying to make the UIActivityViewController Markup tool work in my app using the code below (iOS 13/ iPad only):@IBAction func actionButtonPressed(_ sender: UIBarButtonItem) { let items = [<URL of a pdf file>] let avc = UIActivityViewController(activityItems: items as [Any], applicationActivities: nil) avc.modalPresentationStyle = UIModalPresentationStyle.popover avc.popoverPresentationController?.barButtonItem = sender avc.completionWithItemsHandler = { (type,completed,items,error) in if type == .markupAsPDF { if completed { print("markup completed") } else { print("markup not completed") } } } self.present(avc, animated: true, completion: nil) }The pdf file is in my app iCloud container.Everything is fine until I press the Done button (top left corner). I am then presented with a popup with two choices: "Save File To..." and "Delete PDF"1) Those two options don't make any sense for my app. What I would really want is "Save" and "Cancel". Or simply no options and just save the changes.2) Although I don't care about the "Save File To..." option, it seems to work as expected.3) The second and last option is "Delete PDF" which seems scary. One would think that the pdf file being annotated will be deleted. Not what I want. But it turns out that choosing "Delete PDF" simply saves the annotations in the original pdf file. This is completely confusing (and the returned "completed" flag is false....)I noticed that the iOS Files app also allows pdf files to be annotated but in the Files App case when the user presses the "Done" button, annotations are simply saved without the "Save File To..."/"Delete PDF" options. That would be a lot more preferable for my app.I tried several things (e.g pass a NSData instead of URL, copy the file to the local Documents folder, etc...) no luck.Anybody knows how to implement the Files app behavior for the Done button?The current behavior is completely confusing and I would have to simply remove the markup activity from the UIActivityViewController if I can't find a solution.Thanks
Posted
by hlx.
Last updated
.
Post not yet marked as solved
1 Replies
790 Views
I can't drag and drop or paste files anymore from Finder to my app iCloud Ubiquitous container. My app used to be an iOS (iPad) only app that I recently ported to the Mac using Catalyst. This problem may have started after moving to Monterey or more likely after I ported my iOS app to the Mac. Before that, I had not problem dragging pdf files to my iCloud Ubiquitous container from Finder. In fact this was one of the main way my iOS app could get new content so I know it used to work (other way is to save a file from another app that can export pdfs) Now I get the no drop cursor icon. I can duplicate files, create folders, drag out files, deleted files, save new files from other apps... just can't drag and drop or paste files into the iCloud Ubiquitous container folder from Finder. Also can't "Get Info" on the iCloud Ubiquitous container. The only workaround I found is to use iCloud Drive app from iCloud.com. Drag and Drop works just fine there????? Any idea what broke in my container? Thanks H-
Posted
by hlx.
Last updated
.