When dealing with SwiftUI and searchable modifier, I know you can use URL or hard code data to search when building projects in Xcode.
I am looking to see if you can use a txt file as a way or storing string data of lists to search from when your device is offline when using the search modifier. Then when connected to internet you can update the search with url connection that then updates the txt file so you can do new searches the next time you are offline again.
Is this something that is possible?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have an Xcode app where currently txt files in the project display text data as a list. I can search through the lists and have buttons that will swap between different lists of information that you can look through.
The next task is I have URL connections to docx files on a SharePoint site. I am trying to use an URLsession function to connect to the URL links to download the documents to the document directory then have the application read the doc information to then be displayed as the txt info would.
The idea is that the docx files are a type of online update version of the data. So when the app is used and on wifi, the app can update the list data with the docx files.
I have code set up that should access the URL files but I am struggling to figure out how to read the data and access from this Documents directory. I have been looking online and so far I am at a loss on where to go here.
If anyone can help or provide some insight I would greatly appreciate it.
I can try and provide code samples to help explain things if that is needed.