Hot reloading as a Swift Package

Overview

Yes, HotReloading for Swift & Objective-C

The InjectionIII app available as a Swift Package. i.e.:

Icon

Then you can do this (using the simulator)... Icon

To try out an example project that is already set-up, clone this fork of SwiftUI-Kit.

To use on your project, add this repo as a Swift Package to your project and add the following "Run Script" "Build Phase" to run the HotReloading daemon:

if [ -d $SYMROOT/../../SourcePackages ]; then
    $SYMROOT/../../SourcePackages/checkouts/HotReloading/start_daemon.sh
elif [ -d "$SYMROOT"/../../../../../SourcePackages ]; then
    "$SYMROOT"/../../../../../SourcePackages/checkouts/HotReloading/fix_previews.sh
fi

You should see a message that the app has connected and which directories it is watching for source file changes. The daemon also has an icon on the menu bar you can use to access features such as tracing and remote control. This script also patches your project slightly to add the required "-Xlinker -interposable" "Other Linker Flags" so you will have to run the project a second time after adding the HotReloading package and and the script build phase for hot reloading to start working.

Consult the REAME of the InjectionIII project for more information in paticular how to use it to inject SwiftUI using the HotSwiftUI protocol extension. It's the same code but you no longer need to download or run the app and the project is selected automatically.

If you want to work on the hot reloading code, clone this repo and drag its directory into your project in Xcode and it will take the place of the configured HotReloading Swift Package when you build your app.

Thanks to...

The App Tracing functionality uses the OliverLetterer/imp_implementationForwardingToSelector trampoline implementation via the SwiftTrace project under an MIT license.

SwiftTrace uses the very handy https://github.com/facebook/fishhook as an alternative to dyld_dynamic_interpose. See the project source and header file included in the app bundle for licensing details.

This project includes code for video capture adapted from acj/TimeLapseBuilder-Swift

This release includes a very slightly modified version of the excellent canviz library to render "dot" files in an HTML canvas which is subject to an MIT license. The changes are to pass through the ID of the node to the node label tag (line 212), to reverse the rendering of nodes and the lines linking them (line 406) and to store edge paths so they can be coloured (line 66 and 303) in "canviz-0.1/canviz.js".

It also includes CodeMirror JavaScript editor for the code to be evaluated in the Xprobe browser under an MIT license.

$Date: 2021/05/05 $

You might also like...
A small SwiftUI based chat client for IRC, using swift-nio-irc
A small SwiftUI based chat client for IRC, using swift-nio-irc

NeoIRC A simple Internet Relay Chat client implemented using SwiftNIO and SwiftUI. Inspired by: For maximum NIO someone (I’m tempted) should adopt NIO

🎮 Favorite your games filter and see the upcoming games and ! Swift + Combine = 💜 Hacktoberfest 🎃 👾
🎮 Favorite your games filter and see the upcoming games and ! Swift + Combine = 💜 Hacktoberfest 🎃 👾

✨ Revill is App to list games and search best games ✨ Design in Swift UI + Combine ✨ The idea is develop this app in Hacktober Fest Expected To Do Des

VT100/Xterm Terminal emulator in Swift
VT100/Xterm Terminal emulator in Swift

SwiftTerm SwiftTerm is a VT100/Xterm terminal emulator library for Swift applications that can be embedded into macOS, iOS applications, text-based, h

🎲 100% SwiftUI 2.0, classic 2048 game [SwiftUI 2.0, iOS 14.0+, iPadOS 14.0+, macOS 11.0+, Swift 5.3].
🎲 100% SwiftUI 2.0, classic 2048 game [SwiftUI 2.0, iOS 14.0+, iPadOS 14.0+, macOS 11.0+, Swift 5.3].

swiftui-2048 If you like the project, please give it a star ⭐ It will show the creator your appreciation and help others to discover the repo. ✍️ Abou

My submission for WWDC'21 Swift Student Challenge which was selected.
My submission for WWDC'21 Swift Student Challenge which was selected.

Double Spending This is my submission for Swift Student Challenge - WWDC2021. This playgrounds aims to teach you basics of Double Spending Attack. Thi

My WWDC21 Swift Student Challenge Submission

Swift3D A 3D framework for everyone. I love SwiftUI. I have been using it constantly since it came out in 2019 and its power and ease of use are what

A swift client library for GoTrue.

gotrue-swift Swift client for the GoTrue API. Using The usage should be the same as gotrue-js except: Oauth2: signIn with oauth2 provider only return

My project for WWDC21 Swift Student Challenge!
My project for WWDC21 Swift Student Challenge!

Art with Times Table An interactive book that shows the figures that are generated when times tables are drawn inside a circle. This project was appro

Examples for Swift Algorithms visualized in SwiftUI.
Examples for Swift Algorithms visualized in SwiftUI.

Examples for Swift Algorithms Examples for Swift Algorithms visualized in SwiftUI. There are many more algorithms in the package - feel free to contri

Owner
John Holdsworth
Add a bio
John Holdsworth
Reusable & customizable SwiftUI settings sheet as a Swift package

PackAPrefPane Reusable & customizable SwiftUI settings sheet as a Swift package Features Swift package 100% Swift 99% SwiftUI Simple design Lightweigh

W1W1-M 9 Nov 6, 2022
A simple and lightweight Swift package which provides a SwiftUI view for interactive geo coordinates input!

LocationPicker for SwiftUI LocationPicker for SwiftUI is a very simple and lightweight Swift package which provides you a SwiftUI view for interactive

Alessio Rubicini 17 Dec 7, 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
A swift package(SPM) with iOS UI component that loads and displays images from remote urls or local assets and displays in a slide-show form with auto scroll feature.

MDBannersView A swift package with an iOS UI component that loads and displays images from remote urls, local assets and displays in a slide-show form

Madhav Deva 2 Feb 5, 2022
New version of CardinalKit based on the Swift Package Manager and a modularized architecture.

CardinalKit Open-source framework for rapid development of modern, interoperable digital health applications. Contributing Contributions to this proje

Stanford Biodesign for Digital Health 3 Dec 3, 2022
A package that allows you to easily enable the Xcode canvas to a UIKit view.

UIViewCanvas This package allows you to enable a SwiftUI Xcode canva to a UIView or a entire ViewController. Why? Run emulator everytime you need to t

Wender 14 Jun 9, 2022
Swift Playgrounds desenvolvido para o Swift Student Challenge da WWDC 21

Pile Up Swift Playgrounds desenvolvido para o Swift Student Challenge da WWDC 21 Descrição Pile Up é um quebra cabeça cujo objetivo é empilhar os bloc

Beatriz Sato 3 Jun 5, 2021
Swift Language Weather is an iOS weather app developed in Swift

Swift Language Weather SwiftWeather has renamed to Swift Language Weather. Because this repo is ranked number one in Google when we search "Swift Weat

Jake Lin 5.2k Jan 7, 2023
Todo-app-swift- - A Todo Lists app built using swift

TODO-Lists App Available on the App Store What is this? This is a todo app I mad

Kushal Shingote 3 Feb 20, 2022
Swift playground teaching basics of buffer overflow vulnerability and ARM64 assembly by exploiting vulnerable app on ARM64 emulator (WWDC22 Swift Student Challenge Winner)

Pwnground Project overview Pwnground is a project created as my submission for WWDC22 Swift Student Challenge (winner). It is an interactive Swift Pla

Bartłomiej Pluta 4 Aug 8, 2022