The primary application for this extension is to learn SwiftUI or to create simple layouts without the need to use XCode environment. Check SwiftUI tutorails from Apple.
A handful of snippets to generate your SwiftUI code. Note, that at the moment it doesn't include a plethora of all available elements/modifiers. It's created mostly for education purposes. You ain't need to run an existing XCode project in XCode in order to preview. To build the preview / app you can use
Or you can setup a new test target and call the build process from the commmand line:
Firstly, you need to setup "Unit Testing Bundle" Target in XCode project.
Make sure that under [Project name] >> [Device name] >> Edit Scheme…
"Test" tab there is a "[Project name]Tests" added & enabled.
Run the command in the current directory of the project:
xcodebuild -scheme ${Project_name} test -destination "name=YourDeviceName_or_SimulatorDeviceName" -project ${Project_name}.xcodeproj
You can find out the connected device name or available simulator devices by running:
instruments -s
What's included
// Views like:
Text(), VStack() //, etc.
// and modifiers, e.g:
.font(Font.TextStyle, design: Font.Design)
This package contains all neccessary code snippets to generate your UI elements swiftly.