this post was submitted on 09 Jun 2024
2 points (100.0% liked)

iOS

1259 readers
1 users here now

The home for all things iOS on LW.

Rules:

founded 2 years ago
MODERATORS
 

Like if I want to create running functional programs that import stuff like AVFoundation and just don't have the UI/visual side to worry about, is there a way to do that and on iOS/iPhone cuz that's all I have rn?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 6 months ago (1 children)

swift.org has tutorials for command line applications. Have you tried a simple main function without anything else?

[–] cheese_greater 1 points 6 months ago (1 children)

I haven't tried anything yet, I kinda just had the thought today that there must be a way to run Swift stuff just for testing and practical purposes.

Is that like the @main thing in the App.swift section of regular XCode projects?

[–] [email protected] 1 points 6 months ago

I checked and you can do everything with the command line: https://www.swift.org/getting-started/cli-swiftpm/

It makes sense because servers and CI don’t need Xcode or a screen to build applications, everything is automated somehow.