├── .gitattributes ├── .DS_Store └── PizzaRestaurant ├── .DS_Store ├── PizzaRestaurant ├── Assets.xcassets │ ├── Contents.json │ ├── AccentColor.colorset │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── PizzaRestaurant.xcdatamodeld │ ├── .xccurrentversion │ └── PizzaRestaurant.xcdatamodel │ │ └── contents ├── PizzaRestaurantApp.swift ├── Info.plist ├── OrderSheet.swift ├── Persistence.swift └── ContentView.swift ├── PizzaRestaurant.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── andreasschultz.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── andreasschultz.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── Order+CoreDataClass.swift └── Order+CoreDataProperties.swift /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BLCKBIRDS/Core-Data-in-SwiftUI---Pizza-Restaurant-App/HEAD/.DS_Store -------------------------------------------------------------------------------- /PizzaRestaurant/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BLCKBIRDS/Core-Data-in-SwiftUI---Pizza-Restaurant-App/HEAD/PizzaRestaurant/.DS_Store -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /PizzaRestaurant/Order+CoreDataClass.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Order+CoreDataClass.swift 3 | // PizzaRestaurant 4 | // 5 | // Created by Andreas Schultz on 27.09.20. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | @objc(Order) 13 | public class Order: NSManagedObject { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant.xcodeproj/project.xcworkspace/xcuserdata/andreasschultz.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BLCKBIRDS/Core-Data-in-SwiftUI---Pizza-Restaurant-App/HEAD/PizzaRestaurant/PizzaRestaurant.xcodeproj/project.xcworkspace/xcuserdata/andreasschultz.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/PizzaRestaurant.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | PizzaRestaurant.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant.xcodeproj/xcuserdata/andreasschultz.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PizzaRestaurant.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/PizzaRestaurantApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PizzaRestaurantApp.swift 3 | // PizzaRestaurant 4 | // 5 | // Created by Andreas Schultz on 25.09.20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct PizzaRestaurantApp: App { 12 | let persistenceController = PersistenceController.shared 13 | 14 | var body: some Scene { 15 | WindowGroup { 16 | ContentView() 17 | .environment(\.managedObjectContext, persistenceController.container.viewContext) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/PizzaRestaurant.xcdatamodeld/PizzaRestaurant.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /PizzaRestaurant/Order+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Order+CoreDataProperties.swift 3 | // PizzaRestaurant 4 | // 5 | // Created by Andreas Schultz on 27.09.20. 6 | // 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | 13 | extension Order { 14 | 15 | @nonobjc public class func fetchRequest() -> NSFetchRequest { 16 | return NSFetchRequest(entityName: "Order") 17 | } 18 | 19 | @NSManaged public var id: UUID? 20 | @NSManaged public var numberOfSlices: Int16 21 | @NSManaged public var pizzaType: String 22 | @NSManaged public var status: String 23 | @NSManaged public var tableNumber: String 24 | 25 | var orderStatus: Status { 26 | set { 27 | status = newValue.rawValue 28 | } 29 | get { 30 | Status(rawValue: status) ?? .pending 31 | } 32 | } 33 | 34 | } 35 | 36 | extension Order : Identifiable { 37 | 38 | } 39 | 40 | enum Status: String { 41 | case pending = "Pending" 42 | case preparing = "Preparing" 43 | case completed = "Completed" 44 | } 45 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/OrderSheet.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OrderSheet.swift 3 | // PizzaRestaurant 4 | // 5 | // Created by Andreas Schultz on 27.09.20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct OrderSheet: View { 11 | 12 | let pizzaTypes = ["Pizza Margherita", "Greek Pizza", "Pizza Supreme", "Pizza California", "New York Pizza"] 13 | 14 | @Environment(\.managedObjectContext) private var viewContext 15 | 16 | @Environment (\.presentationMode) var presentationMode 17 | 18 | @State var selectedPizzaIndex = 1 19 | @State var numberOfSlices = 1 20 | @State var tableNumber = "" 21 | 22 | var body: some View { 23 | NavigationView { 24 | Form { 25 | Section(header: Text("Pizza Details")) { 26 | Picker(selection: $selectedPizzaIndex, label: Text("Pizza Type")) { 27 | ForEach(0 ..< pizzaTypes.count) { 28 | Text(self.pizzaTypes[$0]).tag($0) 29 | } 30 | } 31 | 32 | Stepper("\(numberOfSlices) Slices", value: $numberOfSlices, in: 1...12) 33 | } 34 | 35 | Section(header: Text("Table")) { 36 | TextField("Table Number", text: $tableNumber) 37 | .keyboardType(.numberPad) 38 | 39 | } 40 | 41 | Button(action: { 42 | guard self.tableNumber != "" else {return} 43 | let newOrder = Order(context: viewContext) 44 | newOrder.pizzaType = self.pizzaTypes[self.selectedPizzaIndex] 45 | newOrder.orderStatus = .pending 46 | newOrder.tableNumber = self.tableNumber 47 | newOrder.numberOfSlices = Int16(self.numberOfSlices) 48 | newOrder.id = UUID() 49 | do { 50 | try viewContext.save() 51 | print("Order saved.") 52 | presentationMode.wrappedValue.dismiss() 53 | } catch { 54 | print(error.localizedDescription) 55 | } 56 | }) { 57 | Text("Add Order") 58 | } 59 | } 60 | .navigationTitle("Add Order") 61 | } 62 | } 63 | } 64 | 65 | struct OrderSheet_Previews: PreviewProvider { 66 | static var previews: some View { 67 | OrderSheet() 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/Persistence.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Persistence.swift 3 | // PizzaRestaurant 4 | // 5 | // Created by Andreas Schultz on 25.09.20. 6 | // 7 | 8 | import CoreData 9 | 10 | struct PersistenceController { 11 | static let shared = PersistenceController() 12 | 13 | static var preview: PersistenceController = { 14 | let result = PersistenceController(inMemory: true) 15 | let viewContext = result.container.viewContext 16 | for _ in 0..<10 { 17 | let newItem = Order(context: viewContext) 18 | newItem.status = "pending" 19 | newItem.id = UUID() 20 | newItem.tableNumber = "12" 21 | newItem.pizzaType = "Margherita" 22 | newItem.numberOfSlices = 4 23 | } 24 | do { 25 | try viewContext.save() 26 | } catch { 27 | // Replace this implementation with code to handle the error appropriately. 28 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 29 | let nsError = error as NSError 30 | fatalError("Unresolved error \(nsError), \(nsError.userInfo)") 31 | } 32 | return result 33 | }() 34 | 35 | let container: NSPersistentContainer 36 | 37 | init(inMemory: Bool = false) { 38 | container = NSPersistentContainer(name: "PizzaRestaurant") 39 | if inMemory { 40 | container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null") 41 | } 42 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 43 | if let error = error as NSError? { 44 | // Replace this implementation with code to handle the error appropriately. 45 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 46 | 47 | /* 48 | Typical reasons for an error here include: 49 | * The parent directory does not exist, cannot be created, or disallows writing. 50 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 51 | * The device is out of space. 52 | * The store could not be migrated to the current model version. 53 | Check the error message to determine what the actual problem was. 54 | */ 55 | fatalError("Unresolved error \(error), \(error.userInfo)") 56 | } 57 | }) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // PizzaRestaurant 4 | // 5 | // Created by Andreas Schultz on 25.09.20. 6 | // 7 | 8 | import SwiftUI 9 | import CoreData 10 | 11 | struct ContentView: View { 12 | 13 | @Environment(\.managedObjectContext) private var viewContext 14 | 15 | @FetchRequest(entity: Order.entity(), sortDescriptors: [], predicate: NSPredicate(format: "status != %@", Status.completed.rawValue)) 16 | 17 | var orders: FetchedResults 18 | 19 | @State var showOrderSheet = false 20 | 21 | var body: some View { 22 | NavigationView { 23 | List { 24 | ForEach(orders) { order in 25 | HStack { 26 | VStack(alignment: .leading) { 27 | Text("\(order.pizzaType) - \(order.numberOfSlices) slices") 28 | .font(.headline) 29 | Text("Table \(order.tableNumber)") 30 | .font(.subheadline) 31 | } 32 | Spacer() 33 | Button(action: { 34 | updateOrder(order: order) 35 | }) { 36 | Text(order.orderStatus == .pending ? "Prepare" : "Complete") 37 | .foregroundColor(.blue) 38 | } 39 | } 40 | .frame(height: 50) 41 | } 42 | .onDelete { indexSet in 43 | for index in indexSet { 44 | viewContext.delete(orders[index]) 45 | } 46 | do { 47 | try viewContext.save() 48 | } catch { 49 | print(error.localizedDescription) 50 | } 51 | } 52 | } 53 | .listStyle(PlainListStyle()) 54 | .navigationTitle("My Orders") 55 | .navigationBarItems(trailing: Button(action: { 56 | showOrderSheet = true 57 | }, label: { 58 | Image(systemName: "plus.circle") 59 | .imageScale(.large) 60 | })) 61 | .sheet(isPresented: $showOrderSheet) { 62 | OrderSheet() 63 | } 64 | } 65 | } 66 | 67 | func updateOrder(order: Order) { 68 | let newStatus = order.orderStatus == .pending ? Status.preparing : .completed 69 | viewContext.performAndWait { 70 | order.orderStatus = newStatus 71 | try? viewContext.save() 72 | } 73 | } 74 | } 75 | 76 | struct ContentView_Previews: PreviewProvider { 77 | static var previews: some View { 78 | ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /PizzaRestaurant/PizzaRestaurant.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 45520472251E58FD00C40EAD /* PizzaRestaurantApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45520471251E58FD00C40EAD /* PizzaRestaurantApp.swift */; }; 11 | 45520474251E58FD00C40EAD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45520473251E58FD00C40EAD /* ContentView.swift */; }; 12 | 45520476251E590000C40EAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 45520475251E590000C40EAD /* Assets.xcassets */; }; 13 | 45520479251E590000C40EAD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 45520478251E590000C40EAD /* Preview Assets.xcassets */; }; 14 | 4552047B251E590000C40EAD /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4552047A251E590000C40EAD /* Persistence.swift */; }; 15 | 4552047E251E590000C40EAD /* PizzaRestaurant.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4552047C251E590000C40EAD /* PizzaRestaurant.xcdatamodeld */; }; 16 | 45673E5825208959003AF2BE /* Order+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45673E5625208959003AF2BE /* Order+CoreDataClass.swift */; }; 17 | 45673E5925208959003AF2BE /* Order+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45673E5725208959003AF2BE /* Order+CoreDataProperties.swift */; }; 18 | 45673E7E25208DDC003AF2BE /* OrderSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45673E7D25208DDC003AF2BE /* OrderSheet.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 4552046E251E58FD00C40EAD /* PizzaRestaurant.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PizzaRestaurant.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 45520471251E58FD00C40EAD /* PizzaRestaurantApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PizzaRestaurantApp.swift; sourceTree = ""; }; 24 | 45520473251E58FD00C40EAD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 25 | 45520475251E590000C40EAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 45520478251E590000C40EAD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 27 | 4552047A251E590000C40EAD /* Persistence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Persistence.swift; sourceTree = ""; }; 28 | 4552047D251E590000C40EAD /* PizzaRestaurant.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = PizzaRestaurant.xcdatamodel; sourceTree = ""; }; 29 | 4552047F251E590000C40EAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | 45673E5625208959003AF2BE /* Order+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Order+CoreDataClass.swift"; sourceTree = ""; }; 31 | 45673E5725208959003AF2BE /* Order+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Order+CoreDataProperties.swift"; sourceTree = ""; }; 32 | 45673E7D25208DDC003AF2BE /* OrderSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderSheet.swift; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | 4552046B251E58FD00C40EAD /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXFrameworksBuildPhase section */ 44 | 45 | /* Begin PBXGroup section */ 46 | 45520465251E58FD00C40EAD = { 47 | isa = PBXGroup; 48 | children = ( 49 | 45673E5625208959003AF2BE /* Order+CoreDataClass.swift */, 50 | 45673E5725208959003AF2BE /* Order+CoreDataProperties.swift */, 51 | 45520470251E58FD00C40EAD /* PizzaRestaurant */, 52 | 4552046F251E58FD00C40EAD /* Products */, 53 | ); 54 | sourceTree = ""; 55 | }; 56 | 4552046F251E58FD00C40EAD /* Products */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 4552046E251E58FD00C40EAD /* PizzaRestaurant.app */, 60 | ); 61 | name = Products; 62 | sourceTree = ""; 63 | }; 64 | 45520470251E58FD00C40EAD /* PizzaRestaurant */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 45520471251E58FD00C40EAD /* PizzaRestaurantApp.swift */, 68 | 45520473251E58FD00C40EAD /* ContentView.swift */, 69 | 45673E7D25208DDC003AF2BE /* OrderSheet.swift */, 70 | 45520475251E590000C40EAD /* Assets.xcassets */, 71 | 4552047A251E590000C40EAD /* Persistence.swift */, 72 | 4552047F251E590000C40EAD /* Info.plist */, 73 | 4552047C251E590000C40EAD /* PizzaRestaurant.xcdatamodeld */, 74 | 45520477251E590000C40EAD /* Preview Content */, 75 | ); 76 | path = PizzaRestaurant; 77 | sourceTree = ""; 78 | }; 79 | 45520477251E590000C40EAD /* Preview Content */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 45520478251E590000C40EAD /* Preview Assets.xcassets */, 83 | ); 84 | path = "Preview Content"; 85 | sourceTree = ""; 86 | }; 87 | /* End PBXGroup section */ 88 | 89 | /* Begin PBXNativeTarget section */ 90 | 4552046D251E58FD00C40EAD /* PizzaRestaurant */ = { 91 | isa = PBXNativeTarget; 92 | buildConfigurationList = 45520482251E590000C40EAD /* Build configuration list for PBXNativeTarget "PizzaRestaurant" */; 93 | buildPhases = ( 94 | 4552046A251E58FD00C40EAD /* Sources */, 95 | 4552046B251E58FD00C40EAD /* Frameworks */, 96 | 4552046C251E58FD00C40EAD /* Resources */, 97 | ); 98 | buildRules = ( 99 | ); 100 | dependencies = ( 101 | ); 102 | name = PizzaRestaurant; 103 | productName = PizzaRestaurant; 104 | productReference = 4552046E251E58FD00C40EAD /* PizzaRestaurant.app */; 105 | productType = "com.apple.product-type.application"; 106 | }; 107 | /* End PBXNativeTarget section */ 108 | 109 | /* Begin PBXProject section */ 110 | 45520466251E58FD00C40EAD /* Project object */ = { 111 | isa = PBXProject; 112 | attributes = { 113 | LastSwiftUpdateCheck = 1200; 114 | LastUpgradeCheck = 1200; 115 | TargetAttributes = { 116 | 4552046D251E58FD00C40EAD = { 117 | CreatedOnToolsVersion = 12.0; 118 | }; 119 | }; 120 | }; 121 | buildConfigurationList = 45520469251E58FD00C40EAD /* Build configuration list for PBXProject "PizzaRestaurant" */; 122 | compatibilityVersion = "Xcode 9.3"; 123 | developmentRegion = en; 124 | hasScannedForEncodings = 0; 125 | knownRegions = ( 126 | en, 127 | Base, 128 | ); 129 | mainGroup = 45520465251E58FD00C40EAD; 130 | productRefGroup = 4552046F251E58FD00C40EAD /* Products */; 131 | projectDirPath = ""; 132 | projectRoot = ""; 133 | targets = ( 134 | 4552046D251E58FD00C40EAD /* PizzaRestaurant */, 135 | ); 136 | }; 137 | /* End PBXProject section */ 138 | 139 | /* Begin PBXResourcesBuildPhase section */ 140 | 4552046C251E58FD00C40EAD /* Resources */ = { 141 | isa = PBXResourcesBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | 45520479251E590000C40EAD /* Preview Assets.xcassets in Resources */, 145 | 45520476251E590000C40EAD /* Assets.xcassets in Resources */, 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXResourcesBuildPhase section */ 150 | 151 | /* Begin PBXSourcesBuildPhase section */ 152 | 4552046A251E58FD00C40EAD /* Sources */ = { 153 | isa = PBXSourcesBuildPhase; 154 | buildActionMask = 2147483647; 155 | files = ( 156 | 45673E5925208959003AF2BE /* Order+CoreDataProperties.swift in Sources */, 157 | 4552047B251E590000C40EAD /* Persistence.swift in Sources */, 158 | 45520474251E58FD00C40EAD /* ContentView.swift in Sources */, 159 | 45520472251E58FD00C40EAD /* PizzaRestaurantApp.swift in Sources */, 160 | 45673E5825208959003AF2BE /* Order+CoreDataClass.swift in Sources */, 161 | 45673E7E25208DDC003AF2BE /* OrderSheet.swift in Sources */, 162 | 4552047E251E590000C40EAD /* PizzaRestaurant.xcdatamodeld in Sources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXSourcesBuildPhase section */ 167 | 168 | /* Begin XCBuildConfiguration section */ 169 | 45520480251E590000C40EAD /* Debug */ = { 170 | isa = XCBuildConfiguration; 171 | buildSettings = { 172 | ALWAYS_SEARCH_USER_PATHS = NO; 173 | CLANG_ANALYZER_NONNULL = YES; 174 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 175 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 176 | CLANG_CXX_LIBRARY = "libc++"; 177 | CLANG_ENABLE_MODULES = YES; 178 | CLANG_ENABLE_OBJC_ARC = YES; 179 | CLANG_ENABLE_OBJC_WEAK = YES; 180 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 181 | CLANG_WARN_BOOL_CONVERSION = YES; 182 | CLANG_WARN_COMMA = YES; 183 | CLANG_WARN_CONSTANT_CONVERSION = YES; 184 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 185 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 186 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 187 | CLANG_WARN_EMPTY_BODY = YES; 188 | CLANG_WARN_ENUM_CONVERSION = YES; 189 | CLANG_WARN_INFINITE_RECURSION = YES; 190 | CLANG_WARN_INT_CONVERSION = YES; 191 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 192 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 193 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 194 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 195 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 196 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 197 | CLANG_WARN_STRICT_PROTOTYPES = YES; 198 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 199 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 200 | CLANG_WARN_UNREACHABLE_CODE = YES; 201 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 202 | COPY_PHASE_STRIP = NO; 203 | DEBUG_INFORMATION_FORMAT = dwarf; 204 | ENABLE_STRICT_OBJC_MSGSEND = YES; 205 | ENABLE_TESTABILITY = YES; 206 | GCC_C_LANGUAGE_STANDARD = gnu11; 207 | GCC_DYNAMIC_NO_PIC = NO; 208 | GCC_NO_COMMON_BLOCKS = YES; 209 | GCC_OPTIMIZATION_LEVEL = 0; 210 | GCC_PREPROCESSOR_DEFINITIONS = ( 211 | "DEBUG=1", 212 | "$(inherited)", 213 | ); 214 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 215 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 216 | GCC_WARN_UNDECLARED_SELECTOR = YES; 217 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 218 | GCC_WARN_UNUSED_FUNCTION = YES; 219 | GCC_WARN_UNUSED_VARIABLE = YES; 220 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 221 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 222 | MTL_FAST_MATH = YES; 223 | ONLY_ACTIVE_ARCH = YES; 224 | SDKROOT = iphoneos; 225 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 226 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 227 | }; 228 | name = Debug; 229 | }; 230 | 45520481251E590000C40EAD /* Release */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ALWAYS_SEARCH_USER_PATHS = NO; 234 | CLANG_ANALYZER_NONNULL = YES; 235 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 236 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 237 | CLANG_CXX_LIBRARY = "libc++"; 238 | CLANG_ENABLE_MODULES = YES; 239 | CLANG_ENABLE_OBJC_ARC = YES; 240 | CLANG_ENABLE_OBJC_WEAK = YES; 241 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 242 | CLANG_WARN_BOOL_CONVERSION = YES; 243 | CLANG_WARN_COMMA = YES; 244 | CLANG_WARN_CONSTANT_CONVERSION = YES; 245 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 246 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 247 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 248 | CLANG_WARN_EMPTY_BODY = YES; 249 | CLANG_WARN_ENUM_CONVERSION = YES; 250 | CLANG_WARN_INFINITE_RECURSION = YES; 251 | CLANG_WARN_INT_CONVERSION = YES; 252 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 253 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 254 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 256 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 261 | CLANG_WARN_UNREACHABLE_CODE = YES; 262 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu11; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | MTL_FAST_MATH = YES; 278 | SDKROOT = iphoneos; 279 | SWIFT_COMPILATION_MODE = wholemodule; 280 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 281 | VALIDATE_PRODUCT = YES; 282 | }; 283 | name = Release; 284 | }; 285 | 45520483251E590000C40EAD /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 290 | CODE_SIGN_STYLE = Automatic; 291 | DEVELOPMENT_ASSET_PATHS = "\"PizzaRestaurant/Preview Content\""; 292 | ENABLE_PREVIEWS = YES; 293 | INFOPLIST_FILE = PizzaRestaurant/Info.plist; 294 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 295 | LD_RUNPATH_SEARCH_PATHS = ( 296 | "$(inherited)", 297 | "@executable_path/Frameworks", 298 | ); 299 | PRODUCT_BUNDLE_IDENTIFIER = com.BLCKBIRDS.PizzaRestaurant; 300 | PRODUCT_NAME = "$(TARGET_NAME)"; 301 | SWIFT_VERSION = 5.0; 302 | TARGETED_DEVICE_FAMILY = "1,2"; 303 | }; 304 | name = Debug; 305 | }; 306 | 45520484251E590000C40EAD /* Release */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 311 | CODE_SIGN_STYLE = Automatic; 312 | DEVELOPMENT_ASSET_PATHS = "\"PizzaRestaurant/Preview Content\""; 313 | ENABLE_PREVIEWS = YES; 314 | INFOPLIST_FILE = PizzaRestaurant/Info.plist; 315 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 316 | LD_RUNPATH_SEARCH_PATHS = ( 317 | "$(inherited)", 318 | "@executable_path/Frameworks", 319 | ); 320 | PRODUCT_BUNDLE_IDENTIFIER = com.BLCKBIRDS.PizzaRestaurant; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | SWIFT_VERSION = 5.0; 323 | TARGETED_DEVICE_FAMILY = "1,2"; 324 | }; 325 | name = Release; 326 | }; 327 | /* End XCBuildConfiguration section */ 328 | 329 | /* Begin XCConfigurationList section */ 330 | 45520469251E58FD00C40EAD /* Build configuration list for PBXProject "PizzaRestaurant" */ = { 331 | isa = XCConfigurationList; 332 | buildConfigurations = ( 333 | 45520480251E590000C40EAD /* Debug */, 334 | 45520481251E590000C40EAD /* Release */, 335 | ); 336 | defaultConfigurationIsVisible = 0; 337 | defaultConfigurationName = Release; 338 | }; 339 | 45520482251E590000C40EAD /* Build configuration list for PBXNativeTarget "PizzaRestaurant" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | 45520483251E590000C40EAD /* Debug */, 343 | 45520484251E590000C40EAD /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | /* End XCConfigurationList section */ 349 | 350 | /* Begin XCVersionGroup section */ 351 | 4552047C251E590000C40EAD /* PizzaRestaurant.xcdatamodeld */ = { 352 | isa = XCVersionGroup; 353 | children = ( 354 | 4552047D251E590000C40EAD /* PizzaRestaurant.xcdatamodel */, 355 | ); 356 | currentVersion = 4552047D251E590000C40EAD /* PizzaRestaurant.xcdatamodel */; 357 | path = PizzaRestaurant.xcdatamodeld; 358 | sourceTree = ""; 359 | versionGroupType = wrapper.xcdatamodel; 360 | }; 361 | /* End XCVersionGroup section */ 362 | }; 363 | rootObject = 45520466251E58FD00C40EAD /* Project object */; 364 | } 365 | --------------------------------------------------------------------------------