Posts

Post not yet marked as solved
0 Replies
387 Views
With SwiftUI's onOpenURL(perform:) view modifier (https://developer.apple.com/documentation/swiftui/outlinesubgroupchildren/onopenurl(perform:)), is there any mechanism for accessing the options dictionary? In UIKit, the UIApplicationDelegate it would be passed as a parameter to application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]).
Posted Last updated
.
Post not yet marked as solved
0 Replies
565 Views
I'm working on an iOS shoebox app, which stores records in a database, but also supports arbitrary file attachments. The files live in the app's container, and are synced with other machines, but the app's purpose is not a general file storage mechanism and there is no explicit cloud component. I'd like to be able to offer the user the opportunity to edit these files in-place. For example if one of them was a Numbers file, the user should be able to select it in my app, open up a share sheet, and tap Numbers to edit the document - without Numbers creating a copy of it. At the moment, it's looking to me as though the only way to achieve this is for the shoebox app to implement a FileProviderExtension. However, a FileProviderExtension would presumably also surface all of the attachments in the Files app, and in the file browser sheet of any other document-based app, which is not really appropriate for this use case. Am I missing something here? Is there another way to achieve what I want?
Posted Last updated
.
Post not yet marked as solved
1 Replies
922 Views
I'm struggling a bit with a couple of aspects of this.I seem to have the basics working. I can launch my application, make an edit to a core data record, search for it in Spotlight, and it shows up. I can click on the result and end up back in my app highlighting the relevant record.All good.However, I'm struggling with a couple of problems.1. I want to offer the user a plain-text search within the application. I can see how to set up the search query, but it seems to need to be of the form "<attribute> <operator> <value>" - eg "name == 'test'".I don't want to have to specify an attribute - I want to do a free-text search that will pick up any attribute (just like typing into the system Spotlight search field).Any idea how I achieve this?2. My application has an option to start with some sample data. This actually comes from a pre-build database, which I swap in using `replacePersistentStore`. Whatever I do, I can't seem to get core spotlight to index this data. The WWDC session said that it'll do a full index when it first encounters some new data. This does not seem to happen. I'm not clear if i'm supposed to be doing something to prompt this to happen. There are other ways that I could generate the sample data if necessary, but it's very convenient being able to just swap in an existing database.Any thoughts on how to achieve this?
Posted Last updated
.