SandboxKit - Framework that makes it easy to launch a single Scene of your application

Overview

SandboxKit

This framework makes debugging more efficient in your application.

Sandbox is the name of a structure that improves the efficiency of debugging your application.

Branch the startup Scene at the entry point of your application with using debug flag and the Scene that you want to debug is launched from the beginning.

This framework is introduced in iOSDC 2021.

Installation

Cocoapods

use_frameworks!

pod 'SandboxKit'

Usage

  1. Install SandboxKit in your application.

  2. Add a new schema from Manage Schemes in Xcode, and specify the environment variable RUNNING_SANDBOX from the Argument item in the Run configuration.

  3. In AppDelegate, check the existence of the environment variable from Prosess, and if it is started with the schema for the Sandbox, specify the rootViewController for Sandbox.

class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        if ProcessInfo.processInfo.environment["RUNNING_MINIAPP"] == "1" {
            window = UIWindow(frame: UIScreen.main.bounds)
            let viewController = ViewController {
                Scene(
                    name: "PokemonDetail",
                    PokemonDetailViewController(id: 133)
                ) {
                    Mock(path: "/pokemons/133", statusCode: 200, method: .get) {
                        JSONData(from: "pokemon")
                    }
                }

                /// ....
            }
            window?.rootViewController = UINavigationController(rootViewController: viewController)
            window?.makeKeyAndVisible()
            return true
        }

        /// ....
        return true
    }
}
  1. Inherit SandboxKit.SandboxSceneSelectTableViewController and implement your stub and your initialization.
final class ViewController: SandboxSceneSelectTableViewController {
    override init(@SandboxScenes _ makeScenes: () -> [Scene]) {
        super.init(makeScenes)
    }

    override func initializeScene(_ scene: Scene) {
      /// ....
    }
}
  1. Select Sandbox schema and launch your application.

See SandboxKitDemo for detailed implementation.

License

SandboxKit is released under the MIT License.

You might also like...
UIEnvironment - A framework that mimics the SwiftUI view's environment to replicate the value distribution thought your UIKit app.

A framework that mimics the SwiftUI view's environment to replicate the value distribution thought your UIKit view hierarchy. Overview D

Displays your HomeKit temperature sensors in your menu bar
Displays your HomeKit temperature sensors in your menu bar

Temperature Glance Displays your HomeKit temperature sensors in your menu bar Screenshot Note This is a very simple app that I made for myself but dec

The Art World in Your Pocket or Your Trendy Tech Company's Tote, Artsy's mobile app.
The Art World in Your Pocket or Your Trendy Tech Company's Tote, Artsy's mobile app.

Meta State: production Point People: Brian Beckerle, Mounir Dhahri, Pavlos Vinieratos CI : This is an Artsy OSS project. Other mobile projects are Ene

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Introduction Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the latest

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Respresso Android client Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Respresso iOS client Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the

You can monitor your APIs and websites on your menubar. Gives you status code 🎉 Cool & good
You can monitor your APIs and websites on your menubar. Gives you status code 🎉 Cool & good

Hope not. Monitor your APIs and websites on your menubar. For macOS. Right now! YyeeeHav!

A Collection of PropertyWrappers to make custom Serialization of Swift Codable Types easy

CodableWrappers Simplified Serialization with Property Wrappers Move your Codable and (En/De)coder customization to annotations! struct YourType: Coda

🧸 Xcode Playground management made easy
🧸 Xcode Playground management made easy

Toybox Toybox made easy to manage Xcode Playgrounds. You can create and open Xcode Playground from CLI. $ toybox create Snippet # Generate ~/.toybox/S

Owner
Aoi Okawa
iOS Engineer @ Cookpad Inc.
Aoi Okawa
Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.

Prism is a Design System code generator developed by the team at Gett ?? . Synchronizing design teams with engineering teams is a huge challenge. As t

Gett 346 Dec 31, 2022
TagKit makes it easy to create tag-based apps in SwiftUI.

About TagKit TagKit makes it easy to work with tags in Swift and SwiftUI. The result can look like this or completely different: Tags and tag views ca

Daniel Saidi 18 Dec 23, 2022
Xcode Plugin helps you find missing methods in your class header, protocols, and super class, also makes fast inserting.

FastStub-Xcode Life is short, why waste it on meaningless typing? What is it? A code generating feature borrowed from Android Studio. FastStub automat

mrpeak 509 Jun 29, 2022
🛠 A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern.

Model-View-Presenter template A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern. This

Tamerlan Satualdypov 22 Nov 9, 2022
How to develop an iOS 14 application with SwiftUI 2.0 framework. How to create an Onboarding Screen with Page Tab View

Ama-Fruits USER INTERFACE AND USER EXPERIENCE APP DESIGN How to develop an iOS 14 application with SwiftUI 2.0 framework. How to create an Onboarding

Noye Samuel 1 Dec 11, 2021
Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Peter Larson 17 Jun 27, 2022
PagecallSDK - Integrate Pagecall for your iOS Application

Integrate Pagecall for your iOS Application [!] Bitcode is not supported, becaus

PPLINK 0 Feb 4, 2022
ExpoMod - a small application tool that lets you quickly setting up your computer for presentations / exhibitions

ExpoMod is a small application tool that lets you quickly setting up your computer for presentations / exhibitions. Or simply having useful shortcut to not being distract and keep awake your computer.

Niemes 10 Jun 29, 2022
Start your next Open-Source Swift Framework 📦

SwiftKit enables you to easily generate a cross platform Swift Framework from your command line. It is the best way to start your next Open-Source Swi

Sven Tiigi 821 Dec 28, 2022
ConfettiKit is a custom framework used to add Confetti on your iOS/iPadOS projects.

ConfettiKit is a custom framework used to add Confetti on your iOS/iPadOS projects. The kit provides variety of customisations inorder to design a confetti which matches your project's UI. ConfettiKit makes your work of adding Confetti on your project with just one line of code.

Gokul Nair 14 Sep 27, 2022