From Apple documentation for IV,
This parameter is ignored if ECB mode is used or
if a stream cipher algorithm is selected.
func AESEncryption(key: String) -> String? {
let keyData: NSData! = (key as NSString).data(using: String.Encoding.utf8.rawValue) as NSData!
...