Companion app and XCode extension for adding SwiftUI recipes to your code.

Overview

SwiftUI Recipes Companion

Free Companion app and XCode extension for adding SwiftUI recipes to your code.

Choose from a rich selection of SwiftUI recipes, that range from simple tasks to entire custom components:

Companion App

Then, simply insert their code straight into yours via the Editor menu:

Companion App

Be sure to check out the online version as well!

Installation

  • Download and install the app from the App Store.
  • Run the companion app first (search Applications -> SwiftUI Recipes). It'll fetch the list of recipes from Github and allow you to preview their content/code and exclude those you don't want in your Editor menu. After you're done, be sure to press the Save button.
  • Go to System Preferences -> Extensions -> Xcode Source Editor -> Check Helper (with SwiftUI Recipes app icon).
  • Run Xcode (or restart if it was open) and go to Editor -> Recipes -> .... Pressing any recipe command will insert its code at your cursor. There's also the special Run Companion command that will start the companion app again.

Usage

Companion App:

  • The list of recipes will be fetched automatically, but you can pull it again with Refresh.
  • Click the recipe to see its details, image and code.
  • Checkmark on left-hand side means that the recipe will show up in your XCode Extension. If you click it, it turns into a red X and then the recipe is excluded.
  • Click Save to store the recipes locally to that the XCode extension can use them.
  • Regularly check for new recipes, as new ones are added on a daily basis.

Source Editor Extension:

  • Open a project and one of its source files.
  • Go to the menu, Editor -> Recipes -> .. and select a recipe to insert its code at your cursor.
  • Click Editor -> Recipes -> Run Companion to open the companion app again. If you make any changes in the companion app, you'll have to restart XCode for the changes to take effect.

Contributing Recipes

All the recipes are open source and live in the Recipes folder in the Git.

Any contributions are more than welcome! Let's grow the cookbook together!

To contribute a recipe, simply create a PR with a new recipe file. A recipe file is a yml with the following structure:

---
title: "Title of the recipe, as it'll appear in the App/Extension. Can only contain slash / and parentheses () as special characters."
description: "Give a short description of the recipe here."
author: "Your name or email address."
url: "Optional, URL to more details on the subject."
image: "Optional, URL to the image accompanying the recipe. Feel free to include the image in the PR."
updatedAt: "ISO-formatted timestamp of the latest recipe update."
minSwiftUIVersion: Minimum SwiftUI version that supports the recipe, e.g 1, 2, 3
maxSwiftUIVersion: Optional, if the recipe got deprecated in a newer SwiftUI version.
---
RECIPE CODE GOES HERE

Blog

Check out SwiftUIRecipes.com for in-depth explanations of common, yet puzzling SwiftUI tasks.

You might also like...
Superhero-composable-watch-example - A superhero themed experiment using the swift composable architecture on a SwiftUI/Combine iOS app and Watch extension
In this tutorial, you’ll write your very first Core Data application with SwiftUI in Xcode

TodoApp-IOS In this tutorial, you’ll write your very first Core Data application with SwiftUI in Xcode. You’ll see how easy it is to get started with

Weather-app - Created a simple weather app on Xcode using SwiftUI, only shows one location

weather-app Created a simple weather app on Xcode using SwiftUI, only shows one

Simple alternate app icons with Xcode 13 and SwiftUI
Simple alternate app icons with Xcode 13 and SwiftUI

XCode 13 Alternate App Icons Preamble With the beta of XCode 13 creating alternate app icons is now much simpler and requires much less manual steps t

Advent Of Code (AoC) 2021Advent Of Code (AoC) 2021

AoC-2021 Advent Of Code (AoC) 2021 This are my solutions to the Advent Of Code 2021 event. This year I've been playing along with timsearle and SFrost

An extension to the standard SwiftUI library.
An extension to the standard SwiftUI library.

SwiftUIX: An extension to the standard SwiftUI library. SwiftUIX attempts to fill the gaps of the still nascent SwiftUI framework, providing an extens

SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina
SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina

SwiftUI MovieDB iOS 13 App SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina Requirements macOS 10.15 Catalina Xcode 11 Be

A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select.
A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select.

iVariant A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select. Preview License iVariant is licensed under MIT. Cop

Visualize your dividend growth. DivRise tracks dividend prices of your stocks, gives you in-depth information about dividend paying stocks like the next dividend date and allows you to log your monthly dividend income.
Visualize your dividend growth. DivRise tracks dividend prices of your stocks, gives you in-depth information about dividend paying stocks like the next dividend date and allows you to log your monthly dividend income.

DivRise DivRise is an iOS app written in Pure SwiftUI that tracks dividend prices of your stocks, gives you in-depth information about dividend paying

Owner
Gordan Glavaš
Gordan Glavaš
Recipes app written in SwiftUI using Single State Container

swiftui-recipes-app Recipes app is written in SwiftUI using Single State Container This app implemented as an example of a Single State Container conc

Majid Jabrayilov 512 Dec 31, 2022
In this mini app covered the concepts like basics of SwiftUI and Navigations and Animations and List with CRUD functions and MVVM and App Launch and App icons adding and also applied persistence using UserDefaults Concept.

TodoList In this application used the concepts from the beginner level project of SwiftUI_Evolve_1 The following concepts covered in this mini app Swi

Sivaram Yadav 2 Dec 4, 2021
A cooking book provides recipes to perform certain action on SwiftUI

SwiftUI Recipes This is like a cooking book. provides recipes to perform certain action on SwiftUI Every Project will contain as many SwiftUI views as

Julio Ismael Robles 2 Nov 23, 2021
Animal Crossing New Horizon companion app in SwiftUI

You can now download the app on the App Store! The best Animal Crossing New Horizons companion app! 最高の「あつまれ どうぶつの森」コンパニオンアプリ Animal Crossing New Hori

Thomas Ricouard 1.6k Dec 29, 2022
An Elden Ring companion app using SwiftUI + GraphQL

The Roundtable The bustling hub area that exists outside of the Lands Between. A place to mingle with other adventurerers, craftsmen, resupply and dis

Thomas Ricouard 45 Sep 25, 2022
This is the simple iOS app for browsing and saving recipes, using Spoonacular API

TastyDojoApp This is the simple iOS app for browsing and saving recipes, using Spoonacular API This project includes: MVVM Pattern Searching through t

null 5 Jul 25, 2022
An application on the iPad for people who cook. It comes with features such as smart recipes, recipe management and ingredient inventory tracking.

ChopChop ChopChop is an application on the iPad for people who cook. It comes with features such as smart recipes, recipe management and ingredient in

Seow Alex 0 Dec 23, 2021
A companion app for after-cancer treatment patients

Amber - your smart companion We have developed the iOS app Amber - a companion for after-cancer treatment patients. It connects patients with their do

Alex Studnička 1 Oct 24, 2021
iOS Companion App for PineTime

InfiniLink - an InfiniTime Companion App for iOS This iOS application allows you to interact with your PineTime smartwatch running InfiniTime (and per

null 142 Dec 28, 2022
Swift package adding extensions to SwiftUI.

swiftui-extensions SwiftUIX is an umpteenth package containing extensions for Apple's SwiftUI framework. Content The package currently provides the fo

Alexandre H. Saad 2 Jun 13, 2022