Getting compile time error when runing code.

Hello guys, I’m new to CodeChef and I have been trying to run my code in CodeChef online portal, But I’m always getting errors.

[1mprog.swift:1:24: [0;1;31merror: [0m[1mvalue of type ‘String’ has no member ‘split’
[0mlet inputs = readLine()?.split(separator: " ") ?? []
[0;1;32m ~~~~~~~~~~^ ~~~~~
[0m[1mSwift.String:40:17: [0;1;30mnote: [0m[1mdid you mean ‘_split’?
[0m public func _split(separator: UnicodeScalar) → [String]
[0;1;32m ^
[0m:0: error: error opening input file ‘prog.o’ (No such file or directory
clang: error: no such file or directory: ‘prog.o’
clang: error: no such file or directory: ‘@prog.autolink

here is my code:

let inputs = readLine()?.split(separator: " ") ?? []

I already tried a different swift version for split func but nothing works.
Can anyone help/suggest any solution for this?

I’m using Swift language and browser FireFox
Thank You.