Swift - Execute Shell command error: Cannot find 'Process' in scope

I am compiling a flutter project in xcode which includes a NEPacketTunnelProvider extension. I want to launch a shell command in extension using Process class. I have use

import Foundation

but I get this error

Swift Compiler Error (Xcode): Cannot find Process in scope

I am using XCode 14.2 on macOS 14

I'm having the same problem in executeCommand - Cannot find Process in scope

Swift - Execute Shell command error: Cannot find 'Process' in scope
 
 
Q