So in my app I have a bunch of data that I'd like to write to a log file, and then display it within a UITextView
when I click a button. I know how to toggle the UITextView, but I have no idea how to create and update a log file (in the local filesystem). Thanks for any help.
相关问题
- Core Data lightweight migration crashes after App
- What is the best way to do a search in a large fil
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- how do I log requests and responses for debugging
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- What is the correct way to declare and use a FILE
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
I thought was a class out there to do this automatically as after no luck created my own.
NSLogger is a lightweight class for iOS versions 3.0 and above. It allows developers to easily log different 'events' over time which are locally stored as a .txt file.
https://github.com/northernspark/NSLogger
The basic idea is that you create the file, and append to it every time you log a new line. You can do it quite easily like this:
Writing to the file:
Reading: