Challenge: URLs |

This is a companion discussion topic for the original entry at

Great video. However, I tried to use a similar simple practice code after your lesson and it is giving me an init error on the last line:

let numberURL = URL(fileURLWithPath: “Number.txt”, relativeTo: FileManager.docDirURL)

var number1 = 1005

let numberData = Data(number1)

I am just trying to save a simple int.
I noticed from your example the UInt8 works but a Int8 number doesnt seem to work. Do you treat similar Ints and Floats different when using Data()