Skip to content

Commit

Permalink
Bootstrapping data at app launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfeild committed Aug 22, 2023
1 parent 2c8802f commit 9168612
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion App/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The single entry point for the Food Truck app on iOS and macOS.

import SwiftUI
import FoodTruckKit
import Decide

/// The app's entry point.
///
Expand All @@ -18,7 +19,11 @@ struct FoodTruckApp: App {
@StateObject private var model = FoodTruckModel()
/// The in-app purchase store's state.
@StateObject private var accountStore = AccountStore()


init() {
ApplicationEnvironment.bootstrap(donuts: model.donuts)
}

/// The app's body function.
///
/// This app uses a [`WindowGroup`](https://developer.apple.com/documentation/swiftui/windowgroup) scene, which contains the root view of the app, ``ContentView``.
Expand Down

0 comments on commit 9168612

Please sign in to comment.