I have method which expects user's input Then I would like to cover this method by a test case So, how to emulate user's input in test case func ...
I have method which expects user's input Then I would like to cover this method by a test case So, how to emulate user's input in test case func ...
I'm invoking various command line tools via NSTask. The tools may run for several seconds, and output text constantly to stdout. Eventually, the tool ...
I have a large sized video saved in my documents directory. I want to retrieve this video and remove it's first 5 bytes. For large video files of abov ...
I have a navigation and location tracking app. While a user is tracking his trip, coordinates, speed, timestamp (and a few more) are logged with each ...
I have read PNG file specification and learnt that after the first 8 bytes of PNG signature, we have the IHDR chunk. This image states that we have IH ...
I'm trying to use a Pipe's fileHandleForReading's readabilityHandler to read both the standardOutput and standardError of a Process. However, the mome ...
I am trying to create a simple tool that can create, write and read a named pipe. Here is the code. The file is created correctly with perms of prw ...
I'm writing a plugin for Adobe Premiere on Mac, which opens an external application and then uses NSPipe and NSFileHandle to read the standard output ...
So I am writing accelerometer values to a csv file. Sometimes it works and sometimes it doesn't. Typically when the accelerometer is on for over 5 sec ...
I have a Swift program that reads from FileHandle.standardInput (in Objective-C, this would be +[NSFileHandle fileHandleWithStandardInput]. It should ...
Please note that I'm not asking how to append texts at the end of the file. I'm asking how to prepend texts to the beginning of file. It seems like ...
I need to place some files in my iOS app initially and with app run copy them to Documents. I placed them to main bundle, but I can not move them. Th ...
I'm working on an app and trying to port an old Obj-C code to Swift. As its related to FileHandling and I've little to no experience on working on it, ...
I would like to save data to a file every second. The data records is simple, just a date and number, and would like to append to the file. This can l ...
I am trying to create a file and update the file by adding a string to the end each time i hit save button. However, everytime i hit save it creates a ...
I used to do coding in java but now I want to move my app to iOS using swift 2. So I want a method to append text in new line to an existing txt file ...
I'm logging data to a file that I keep open with NSFileHandle. These log files can be emailed out, is it necessary to close NSFileHandle before I send ...
I'm devising a protocol to be sent via TCP packets that can sometimes send large (video) files between iOS and OSX devices. I've got three questions: ...
First of all, I am new to iOS and Swift and come from a background of Android/Java programming. So to me the idea of catching an exception from an att ...