Q:

What is the equivalent data type for byte in iOS swift?

In Java we have data type called byte but in Swift there is no byte data type available.
In the example below I typecasted the ASCII (0xAF = 175) value by using byte data type.
byte abyte = (byte) 0xAF;

And the result is abyte= -89
How do I acheive this in Swift?

A:

The data type is Unsigned Int 8 (UInt8).  
var byte:UInt8 = 0xAF

For a string of bytes: 
var bytes:[UInt8] = [0xAF,0xAB]

For the bytes from data:
var data = Data()
var bytes = data.bytes //[UInt8]

