Text File Workshop: Find Text File

The text file operation, find text file, search the sandbox’s Documents folder for text file names that match a search term. If the operation found any results, the app put them in an array variable. At this point, you can do what ever you like with the array. For example, you can dump its elements in the console or a table […]

Read More »

Text File Workshop: Delete Text File

The delete text file operation pretty much delete an existing text file in the app’s Documents folder. Further more, the app user is usually the one who initiate this operation by tapping a button in a table view cell. Code presented on this page assume you are using Xcode 7.0 and Swift version 2.0. So if you are using a […]

Read More »

Text File Workshop: Update Text File

The text file operation, update file pretty much update an existing text file in the sandbox’s Documents folder. Further more, the app user is usually the one who initiate this operation by tapping a button on a view. Code presented on this page assume you are using Xcode 7.0 and Swift version 2.0. So if you […]

Read More »

Text File Workshop: Read Text File

The read text file operation basically fetch a text file’s data from the Documents folder, and store it in a string variable. Let us call that variable, fetchedFileData. At this point, you can do what ever you want with the fetchedFileData variable; for example, you can dump it in the console or in a textView. Code presented on this […]

Read More »