In Objective-C I use the following code to
Convert an Int variable into NSData, a packet of bytes.
Int
NSData
int myScore = 0; NS
Use this initializer to convert every Array to Data
Data(element: Sequence)
example:
let myArr = [12,45,67,898, 100] let myArrData = Data(myArr)