├── ChildContextsForEditing
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── ChildContextsForEditing.xcdatamodeld
│ ├── .xccurrentversion
│ └── ChildContextsForEditing.xcdatamodel
│ │ └── contents
├── ChildContextsForEditingApp.swift
├── ItemEditor.swift
├── ItemDetail.swift
├── DataOperation.swift
├── ItemList.swift
├── Persistence.swift
└── Info.plist
├── ChildContextsForEditing.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── project.pbxproj
└── LICENSE
/ChildContextsForEditing/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ChildContextsForEditing.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/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 |
--------------------------------------------------------------------------------
/ChildContextsForEditing.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/ChildContextsForEditing.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | ChildContextsForEditing.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/ChildContextsForEditing.xcdatamodeld/ChildContextsForEditing.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/ChildContextsForEditingApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ChildContextsForEditingApp.swift
3 | // ChildContextsForEditing
4 | //
5 | // Created by Gene Bogdanovich on 20.04.21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct ChildContextsForEditingApp: App {
12 | let persistenceController = PersistenceController.shared
13 |
14 | var body: some Scene {
15 | WindowGroup {
16 | ItemList()
17 | .environment(\.managedObjectContext, persistenceController.container.viewContext)
18 | .onReceive(NotificationCenter.default.publisher(for: UIApplication.willResignActiveNotification)) { _ in
19 | try? persistenceController.container.viewContext.save()
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/ItemEditor.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ItemEditor.swift
3 | // ChildContextsForEditing
4 | //
5 | // Created by Gene Bogdanovich on 7.03.22.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ItemEditor: View {
11 | @Environment(\.dismiss) private var dismiss
12 | @Environment(\.managedObjectContext) private var childContext
13 |
14 | @ObservedObject var item: Item
15 |
16 | var body: some View {
17 | Form {
18 | Section {
19 | if let title = Binding($item.title) {
20 | TextField("Title", text: title)
21 | }
22 | }
23 | }
24 | .toolbar {
25 | Button() {
26 | try? childContext.save()
27 | dismiss()
28 | } label: {
29 | Text("Save")
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Gene Bogdanovich
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/ItemDetail.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ItemDetail.swift
3 | // ChildContextsForEditing
4 | //
5 | // Created by Gene Bogdanovich on 7.03.22.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ItemDetail: View {
11 | @Environment(\.managedObjectContext) private var viewContext
12 | @State private var itemUpdateOperation: UpdateOperation- ?
13 |
14 | @ObservedObject var item: Item
15 |
16 | var body: some View {
17 | Form {
18 | Section {
19 | Text(item.title ?? "")
20 | }
21 | }
22 | .navigationTitle("Item")
23 | .toolbar {
24 | Button("Update") {
25 | itemUpdateOperation = UpdateOperation(withExistingObject: item, in: viewContext)
26 | }
27 | }
28 | .sheet(item: $itemUpdateOperation) { updateOperation in
29 | NavigationView {
30 | ItemEditor(item: updateOperation.childObject)
31 | .navigationTitle("Update Item")
32 | }
33 | .environment(\.managedObjectContext, updateOperation.childContext)
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/DataOperation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DataOperation.swift
3 | // ChildContextsForEditing
4 | //
5 | // Created by Gene Bogdanovich on 7.03.22.
6 | //
7 |
8 | import Foundation
9 | import CoreData
10 |
11 | struct CreateOperation: Identifiable {
12 | let id = UUID()
13 | let childContext: NSManagedObjectContext
14 | let childObject: Object
15 |
16 | init(with parentContext: NSManagedObjectContext) {
17 | let childContext = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
18 | childContext.parent = parentContext
19 | let childObject = Object(context: childContext)
20 |
21 | self.childContext = childContext
22 | self.childObject = childObject
23 | }
24 | }
25 |
26 | struct UpdateOperation: Identifiable {
27 | let id = UUID()
28 | let childContext: NSManagedObjectContext
29 | let childObject: Object
30 |
31 | init(
32 | withExistingObject object: Object,
33 | in parentContext: NSManagedObjectContext
34 | ) {
35 | let childContext = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
36 | childContext.parent = parentContext
37 | let childObject = childContext.object(with: object.objectID) as! Object
38 |
39 | self.childContext = childContext
40 | self.childObject = childObject
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/ItemList.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ItemList.swift
3 | // ChildContextsForEditing
4 | //
5 | // Created by Gene Bogdanovich on 20.04.21.
6 | //
7 |
8 | import SwiftUI
9 | import CoreData
10 |
11 | struct ItemList: View {
12 | @Environment(\.managedObjectContext) private var viewContext
13 | @FetchRequest(sortDescriptors: [SortDescriptor(\.title)]) private var items: FetchedResults
-
14 | @State private var itemCreateOperation: CreateOperation
- ?
15 |
16 | var body: some View {
17 | NavigationView {
18 | List {
19 | ForEach(items, id: \.self) { item in
20 | NavigationLink {
21 | ItemDetail(item: item)
22 | } label: {
23 | Text(item.title ?? "")
24 | }
25 | }
26 | }
27 | .navigationTitle("Items")
28 | .toolbar {
29 | plusButton
30 | }
31 | .sheet(item: $itemCreateOperation) { createOperation in
32 | NavigationView {
33 | ItemEditor(item: createOperation.childObject)
34 | .navigationTitle("New Item")
35 | }
36 | .environment(\.managedObjectContext, createOperation.childContext)
37 | }
38 | }
39 | }
40 |
41 | // MARK: Views
42 |
43 | private var plusButton: some View {
44 | Button(action: {
45 | itemCreateOperation = CreateOperation(with: viewContext)
46 | }) {
47 | Label("Add Item", systemImage: "plus")
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/Persistence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Persistence.swift
3 | // ChildContextsForEditing
4 | //
5 | // Created by Gene Bogdanovich on 20.04.21.
6 | //
7 |
8 | import CoreData
9 |
10 | struct PersistenceController {
11 | static let shared = PersistenceController()
12 |
13 | let container: NSPersistentContainer
14 |
15 | init(inMemory: Bool = false) {
16 | container = NSPersistentContainer(name: "ChildContextsForEditing")
17 | if inMemory {
18 | container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")
19 | }
20 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in
21 | if let error = error as NSError? {
22 | // Replace this implementation with code to handle the error appropriately.
23 | // 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.
24 |
25 | /*
26 | Typical reasons for an error here include:
27 | * The parent directory does not exist, cannot be created, or disallows writing.
28 | * The persistent store is not accessible, due to permissions or data protection when the device is locked.
29 | * The device is out of space.
30 | * The store could not be migrated to the current model version.
31 | Check the error message to determine what the actual problem was.
32 | */
33 | fatalError("Unresolved error \(error), \(error.userInfo)")
34 | }
35 | })
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/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 |
--------------------------------------------------------------------------------
/ChildContextsForEditing/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 |
--------------------------------------------------------------------------------
/ChildContextsForEditing.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 73338087262E9D700035FF57 /* ChildContextsForEditingApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73338086262E9D700035FF57 /* ChildContextsForEditingApp.swift */; };
11 | 73338089262E9D700035FF57 /* ItemList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73338088262E9D700035FF57 /* ItemList.swift */; };
12 | 7333808B262E9D770035FF57 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7333808A262E9D770035FF57 /* Assets.xcassets */; };
13 | 7333808E262E9D770035FF57 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7333808D262E9D770035FF57 /* Preview Assets.xcassets */; };
14 | 73338090262E9D770035FF57 /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7333808F262E9D770035FF57 /* Persistence.swift */; };
15 | 73338093262E9D770035FF57 /* ChildContextsForEditing.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 73338091262E9D770035FF57 /* ChildContextsForEditing.xcdatamodeld */; };
16 | 7391CEC727D6967500D68BB7 /* ItemDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7391CEC627D6967500D68BB7 /* ItemDetail.swift */; };
17 | 7391CEC927D696E200D68BB7 /* DataOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7391CEC827D696E200D68BB7 /* DataOperation.swift */; };
18 | 7391CECB27D6972900D68BB7 /* ItemEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7391CECA27D6972900D68BB7 /* ItemEditor.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | 73338083262E9D700035FF57 /* ChildContextsForEditing.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildContextsForEditing.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | 73338086262E9D700035FF57 /* ChildContextsForEditingApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChildContextsForEditingApp.swift; sourceTree = ""; };
24 | 73338088262E9D700035FF57 /* ItemList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemList.swift; sourceTree = ""; };
25 | 7333808A262E9D770035FF57 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
26 | 7333808D262E9D770035FF57 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
27 | 7333808F262E9D770035FF57 /* Persistence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Persistence.swift; sourceTree = ""; };
28 | 73338092262E9D770035FF57 /* ChildContextsForEditing.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ChildContextsForEditing.xcdatamodel; sourceTree = ""; };
29 | 73338094262E9D770035FF57 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
30 | 7391CEC627D6967500D68BB7 /* ItemDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemDetail.swift; sourceTree = ""; };
31 | 7391CEC827D696E200D68BB7 /* DataOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataOperation.swift; sourceTree = ""; };
32 | 7391CECA27D6972900D68BB7 /* ItemEditor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemEditor.swift; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | 73338080262E9D700035FF57 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | 7333807A262E9D700035FF57 = {
47 | isa = PBXGroup;
48 | children = (
49 | 73338085262E9D700035FF57 /* ChildContextsForEditing */,
50 | 73338084262E9D700035FF57 /* Products */,
51 | );
52 | sourceTree = "";
53 | };
54 | 73338084262E9D700035FF57 /* Products */ = {
55 | isa = PBXGroup;
56 | children = (
57 | 73338083262E9D700035FF57 /* ChildContextsForEditing.app */,
58 | );
59 | name = Products;
60 | sourceTree = "";
61 | };
62 | 73338085262E9D700035FF57 /* ChildContextsForEditing */ = {
63 | isa = PBXGroup;
64 | children = (
65 | 73338086262E9D700035FF57 /* ChildContextsForEditingApp.swift */,
66 | 73338088262E9D700035FF57 /* ItemList.swift */,
67 | 7391CEC627D6967500D68BB7 /* ItemDetail.swift */,
68 | 7391CECA27D6972900D68BB7 /* ItemEditor.swift */,
69 | 7391CEC827D696E200D68BB7 /* DataOperation.swift */,
70 | 7333808A262E9D770035FF57 /* Assets.xcassets */,
71 | 7333808F262E9D770035FF57 /* Persistence.swift */,
72 | 73338094262E9D770035FF57 /* Info.plist */,
73 | 73338091262E9D770035FF57 /* ChildContextsForEditing.xcdatamodeld */,
74 | 7333808C262E9D770035FF57 /* Preview Content */,
75 | );
76 | path = ChildContextsForEditing;
77 | sourceTree = "";
78 | };
79 | 7333808C262E9D770035FF57 /* Preview Content */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 7333808D262E9D770035FF57 /* Preview Assets.xcassets */,
83 | );
84 | path = "Preview Content";
85 | sourceTree = "";
86 | };
87 | /* End PBXGroup section */
88 |
89 | /* Begin PBXNativeTarget section */
90 | 73338082262E9D700035FF57 /* ChildContextsForEditing */ = {
91 | isa = PBXNativeTarget;
92 | buildConfigurationList = 73338097262E9D770035FF57 /* Build configuration list for PBXNativeTarget "ChildContextsForEditing" */;
93 | buildPhases = (
94 | 7333807F262E9D700035FF57 /* Sources */,
95 | 73338080262E9D700035FF57 /* Frameworks */,
96 | 73338081262E9D700035FF57 /* Resources */,
97 | );
98 | buildRules = (
99 | );
100 | dependencies = (
101 | );
102 | name = ChildContextsForEditing;
103 | productName = ChildContextsForEditing;
104 | productReference = 73338083262E9D700035FF57 /* ChildContextsForEditing.app */;
105 | productType = "com.apple.product-type.application";
106 | };
107 | /* End PBXNativeTarget section */
108 |
109 | /* Begin PBXProject section */
110 | 7333807B262E9D700035FF57 /* Project object */ = {
111 | isa = PBXProject;
112 | attributes = {
113 | LastSwiftUpdateCheck = 1240;
114 | LastUpgradeCheck = 1240;
115 | TargetAttributes = {
116 | 73338082262E9D700035FF57 = {
117 | CreatedOnToolsVersion = 12.4;
118 | };
119 | };
120 | };
121 | buildConfigurationList = 7333807E262E9D700035FF57 /* Build configuration list for PBXProject "ChildContextsForEditing" */;
122 | compatibilityVersion = "Xcode 9.3";
123 | developmentRegion = en;
124 | hasScannedForEncodings = 0;
125 | knownRegions = (
126 | en,
127 | Base,
128 | );
129 | mainGroup = 7333807A262E9D700035FF57;
130 | productRefGroup = 73338084262E9D700035FF57 /* Products */;
131 | projectDirPath = "";
132 | projectRoot = "";
133 | targets = (
134 | 73338082262E9D700035FF57 /* ChildContextsForEditing */,
135 | );
136 | };
137 | /* End PBXProject section */
138 |
139 | /* Begin PBXResourcesBuildPhase section */
140 | 73338081262E9D700035FF57 /* Resources */ = {
141 | isa = PBXResourcesBuildPhase;
142 | buildActionMask = 2147483647;
143 | files = (
144 | 7333808E262E9D770035FF57 /* Preview Assets.xcassets in Resources */,
145 | 7333808B262E9D770035FF57 /* Assets.xcassets in Resources */,
146 | );
147 | runOnlyForDeploymentPostprocessing = 0;
148 | };
149 | /* End PBXResourcesBuildPhase section */
150 |
151 | /* Begin PBXSourcesBuildPhase section */
152 | 7333807F262E9D700035FF57 /* Sources */ = {
153 | isa = PBXSourcesBuildPhase;
154 | buildActionMask = 2147483647;
155 | files = (
156 | 7391CEC727D6967500D68BB7 /* ItemDetail.swift in Sources */,
157 | 7391CEC927D696E200D68BB7 /* DataOperation.swift in Sources */,
158 | 73338090262E9D770035FF57 /* Persistence.swift in Sources */,
159 | 73338089262E9D700035FF57 /* ItemList.swift in Sources */,
160 | 73338087262E9D700035FF57 /* ChildContextsForEditingApp.swift in Sources */,
161 | 7391CECB27D6972900D68BB7 /* ItemEditor.swift in Sources */,
162 | 73338093262E9D770035FF57 /* ChildContextsForEditing.xcdatamodeld in Sources */,
163 | );
164 | runOnlyForDeploymentPostprocessing = 0;
165 | };
166 | /* End PBXSourcesBuildPhase section */
167 |
168 | /* Begin XCBuildConfiguration section */
169 | 73338095262E9D770035FF57 /* 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 = 15.2;
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 | 73338096262E9D770035FF57 /* 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 = 15.2;
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 | 73338098262E9D770035FF57 /* 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 = "\"ChildContextsForEditing/Preview Content\"";
292 | DEVELOPMENT_TEAM = LBC5DS5WB6;
293 | ENABLE_PREVIEWS = YES;
294 | INFOPLIST_FILE = ChildContextsForEditing/Info.plist;
295 | IPHONEOS_DEPLOYMENT_TARGET = 15.2;
296 | LD_RUNPATH_SEARCH_PATHS = (
297 | "$(inherited)",
298 | "@executable_path/Frameworks",
299 | );
300 | PRODUCT_BUNDLE_IDENTIFIER = com.genebogdanovich.ChildContextsForEditing;
301 | PRODUCT_NAME = "$(TARGET_NAME)";
302 | SWIFT_VERSION = 5.0;
303 | TARGETED_DEVICE_FAMILY = "1,2";
304 | };
305 | name = Debug;
306 | };
307 | 73338099262E9D770035FF57 /* Release */ = {
308 | isa = XCBuildConfiguration;
309 | buildSettings = {
310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
311 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
312 | CODE_SIGN_STYLE = Automatic;
313 | DEVELOPMENT_ASSET_PATHS = "\"ChildContextsForEditing/Preview Content\"";
314 | DEVELOPMENT_TEAM = LBC5DS5WB6;
315 | ENABLE_PREVIEWS = YES;
316 | INFOPLIST_FILE = ChildContextsForEditing/Info.plist;
317 | IPHONEOS_DEPLOYMENT_TARGET = 15.2;
318 | LD_RUNPATH_SEARCH_PATHS = (
319 | "$(inherited)",
320 | "@executable_path/Frameworks",
321 | );
322 | PRODUCT_BUNDLE_IDENTIFIER = com.genebogdanovich.ChildContextsForEditing;
323 | PRODUCT_NAME = "$(TARGET_NAME)";
324 | SWIFT_VERSION = 5.0;
325 | TARGETED_DEVICE_FAMILY = "1,2";
326 | };
327 | name = Release;
328 | };
329 | /* End XCBuildConfiguration section */
330 |
331 | /* Begin XCConfigurationList section */
332 | 7333807E262E9D700035FF57 /* Build configuration list for PBXProject "ChildContextsForEditing" */ = {
333 | isa = XCConfigurationList;
334 | buildConfigurations = (
335 | 73338095262E9D770035FF57 /* Debug */,
336 | 73338096262E9D770035FF57 /* Release */,
337 | );
338 | defaultConfigurationIsVisible = 0;
339 | defaultConfigurationName = Release;
340 | };
341 | 73338097262E9D770035FF57 /* Build configuration list for PBXNativeTarget "ChildContextsForEditing" */ = {
342 | isa = XCConfigurationList;
343 | buildConfigurations = (
344 | 73338098262E9D770035FF57 /* Debug */,
345 | 73338099262E9D770035FF57 /* Release */,
346 | );
347 | defaultConfigurationIsVisible = 0;
348 | defaultConfigurationName = Release;
349 | };
350 | /* End XCConfigurationList section */
351 |
352 | /* Begin XCVersionGroup section */
353 | 73338091262E9D770035FF57 /* ChildContextsForEditing.xcdatamodeld */ = {
354 | isa = XCVersionGroup;
355 | children = (
356 | 73338092262E9D770035FF57 /* ChildContextsForEditing.xcdatamodel */,
357 | );
358 | currentVersion = 73338092262E9D770035FF57 /* ChildContextsForEditing.xcdatamodel */;
359 | path = ChildContextsForEditing.xcdatamodeld;
360 | sourceTree = "";
361 | versionGroupType = wrapper.xcdatamodel;
362 | };
363 | /* End XCVersionGroup section */
364 | };
365 | rootObject = 7333807B262E9D700035FF57 /* Project object */;
366 | }
367 |
--------------------------------------------------------------------------------