iOS Development

Course No. 10-152-139

Assignment 26-1

  • Create a new Xcode command-line project. Name the project Assignment-26-1.
  • When you coded the project from the book you wrote a line of text to the same file 10 times. In this project you will be writing one line of text to 10 different files.
  • In the main function in the main.m file:
    • Use a classic for loop to output a string to 10 different files. The names of the file should be:
      • output-1.txt
      • output-2.txt
      • output-3.txt
      • output-4.txt
      • output-5.txt
      • output-6.txt
      • output-7.txt
      • output-8.txt
      • output-9.txt
      • output-10.txt
    • Write the same string to each of them, it doesn’t matter what the string is.
    • Use proper error handling so that if you misspell the name of the Desktop directory you will get the text of the error output to the console. Once your program outputs an error message it must stop attempting to create more files.