A utility to generate PreviewDevice presets from the available devices

Related tags

Utility SwiftUIGen
Overview

SwiftUIGen

A utility to generate PreviewDevice presets from the available devices

Installation

  • Manual

Go to the GitHub page for the latest release
Download the swiftuigen.zip file associated with that release
Extract the content of the zip archive in your project directory

  • Homebrew
$ brew tap timberlanelabs/tap
$ brew install swiftuigen

Usage

To generate a file containing the preview devices simply run:

swiftuigen previews --output file.swift

Add the file to your project and you can then use them in your SwiftUI previews:

struct MyApp_Previews: PreviewProvider {
    static var previews: some View {
        MyView()
            .previewDevice(.iPhone(.iPhone11))
    }
}

This could be run as part of a build phase if that is desirable, however this could result in some git 'nosiness' if different team members have different devices so it may be more advantageous to only run this periodically as needed.

You might also like...
macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support
macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support

xcframework-maker macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support. 📝 Description make-xcframew

Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wallpaper image
Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wallpaper image

Change menu bar color in macOS Big Sur Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wal

A simple Swift utility for producing pseudolocalized strings.
A simple Swift utility for producing pseudolocalized strings.

Build your App UI to adapt and respond to translations, and find localization bugs!

Utility to run the SPI-Server tests as a benchmark

spi-benchmark This package comprises a simple tool to run the SwiftPackageIndex-Server tests in a loop, logging the run times. The purpose is to colle

A simple macOS utility that can be used to control the behaviour of Bose QC35 Headphones straight from the menu bar.

bose-macos-utility A simple macOS utility that can be used to control the behaviour of Bose QC35 Headphones straight from the menu bar. Why Have you e

A tiny macOS utility to foster sustainable OSS

SustainableOSS SustainableOSS is a status bar app for macOS that indexes the third-party dependencies your projects depend on, sorts them by usage, an

Simple utility for only executing code every so often.

Rate Limit Simple utility for only executing code every so often. This will only execute the block passed for a given name if the last time it was cal

Utility functions for validating IBOutlet and IBAction connections
Utility functions for validating IBOutlet and IBAction connections

Outlets Utility functions for validating IBOutlet and IBAction connections. About Outlets provides a set of functions which validate that IBOutlets ar

Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX)
Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX)

Mission Control Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX) Brought to you by Have you ever wished you could chang

Owner
Timberlane Labs
Timberlane Labs
Generate Markdown documentation from source code

SourceDocs SourceDocs is a command line tool that generates markdown documentation files from inline source code comments. Similar to Sphinx or Jazzy,

Eneko Alonso 349 Dec 10, 2022
Generate a privacy policy for your iOS app

PrivacyFlash Pro To easily run PrivacyFlash Pro get the latest packaged release. Learn more about PrivacyFlash Pro in our research paper. PrivacyFlash

privacy-tech-lab 141 Dec 22, 2022
Generate protobuf message definitions from Swift structs

SwiftProtobufGen Generates protobuf definitions from Swift structs Building For some reason Xcode builds don't work at all but swiftpm command line bu

null 3 Nov 1, 2021
An extension for Xcode to generate builders from structs

Swift Struct Builder Generator Xcode Source Editor Extension An Xcode extension (plugin) to generate struct builders automatically. Install Swift Stru

Marius Wichtner 1 Nov 24, 2021
An eject button for Interface Builder to generate swift code

Eject Eject is a utility to transition from Interface Builder to programatic view layout. This is done by using code generation to create a .swift fil

Rightpoint 524 Dec 29, 2022
Minecraft-silicon - Generate Apple Silicon-native versions of Minecraft

Minecraft Silicon A dead simple utility to generate Apple Silicon-native Minecra

Cole Feuer 4 Jun 21, 2022
Swift Xid - Xid uses MongoDB Object ID algorighm1 to generate globally unique ids with base32 serialzation to produce shorter strings

Swift Xid - Xid uses MongoDB Object ID algorighm1 to generate globally unique ids with base32 serialzation to produce shorter strings

Uditha Atukorala 0 Jun 13, 2022
Generate and Preview Passbook Passes

Note: This project is no longer being maintained. Passbook is an iOS 6 feature that manages boarding passes, movie tickets, retail coupons, & loyalty

Nomad CLI 324 Dec 21, 2022
A utility that reminds your iPhone app's users to review the app written in pure Swift.

SwiftRater SwiftRater is a class that you can drop into any iPhone app that will help remind your users to review your app on the App Store/in your ap

Takeshi Fujiki 289 Dec 12, 2022
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.

ZamzamKit ZamzamKit is a Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and othe

Zamzam Inc. 261 Dec 15, 2022