JohnSundell / ShellOut

Easily run shell commands from a Swift script or command line tool
MIT License
870 stars 83 forks source link

Cannot find type 'Process' in scope #69

Open PAVUNRAJ opened 1 year ago

PAVUNRAJ commented 1 year ago

The Process class is missing

joadan990 commented 1 year ago

The Process class is missing

Process is part of Foundation, did you forget to do import Foundation?

PAVUNRAJ commented 1 year ago

The Process class is missing

Process is part of Foundation, did you forget to do import Foundation?

No, i import Foundation.

joadan990 commented 1 year ago

You need to provide more context and preferably the code that causes this issue or this discussion won't lead anywhere.

danielbyondd commented 1 year ago

I'm able to repro. Brand new package, added ShellOut and it fails to build

Screenshot 2023-04-12 at 5 21 49 PM Screenshot 2023-04-12 at 5 21 40 PM
danielbyondd commented 1 year ago

Oddly enough, if I try to build in Xcode it fails, but if I run swift build in Terminal it builds just fine. Maybe an Xcode bug? I'm on 14.3 (14E222b).

Ryu0118 commented 1 year ago

I have the same problem, Xcode 14.2.

Bact3rial commented 1 year ago

Well, maybe (just maybe) you are trying to use it for iOS and then I'm afraid it's not the case, because there is no Process for iOS

itsmeichigo commented 6 months ago

I can reproduce the issue and the cause was because the target in Xcode was "Any iOS devices" for me. Switching to My Mac fixed it.