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

iOS

1149 readers
1 users here now

The home for all things iOS on LW.

Rules:

founded 1 year 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?

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 2 months ago (1 children)

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

[–] [email protected] 1 points 2 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 2 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.