Archived
Removed variables and imports related to CoreData
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
A961338C2299867A00B541D4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A961338A2299867A00B541D4 /* LaunchScreen.storyboard */; };
|
||||
A96133972299867A00B541D4 /* AvH_PlanTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96133962299867A00B541D4 /* AvH_PlanTests.swift */; };
|
||||
A96133A22299867A00B541D4 /* AvH_PlanUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96133A12299867A00B541D4 /* AvH_PlanUITests.swift */; };
|
||||
A96133B0229986DF00B541D4 /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96133AF229986DF00B541D4 /* CollectionViewCell.swift */; };
|
||||
A96D4CC822DDE01A006BAB34 /* GeneralPlanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96D4CC722DDE01A006BAB34 /* GeneralPlanViewController.swift */; };
|
||||
A96D4CCA22DDE184006BAB34 /* PersonalPlanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96D4CC922DDE184006BAB34 /* PersonalPlanViewController.swift */; };
|
||||
A996BFF922E05AAB00E7BE42 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A996BFFB22E05AAB00E7BE42 /* InfoPlist.strings */; };
|
||||
@@ -70,7 +69,6 @@
|
||||
A961339D2299867A00B541D4 /* AvH PlanUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AvH PlanUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A96133A12299867A00B541D4 /* AvH_PlanUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvH_PlanUITests.swift; sourceTree = "<group>"; };
|
||||
A96133A32299867A00B541D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
A96133AF229986DF00B541D4 /* CollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = "<group>"; };
|
||||
A96D4CC722DDE01A006BAB34 /* GeneralPlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralPlanViewController.swift; sourceTree = "<group>"; };
|
||||
A96D4CC922DDE184006BAB34 /* PersonalPlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalPlanViewController.swift; sourceTree = "<group>"; };
|
||||
A996BFF322E05AAB00E7BE42 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Base; path = Base.lproj/Info.plist; sourceTree = "<group>"; };
|
||||
@@ -174,7 +172,6 @@
|
||||
A96133882299867A00B541D4 /* Assets.xcassets */,
|
||||
A961338A2299867A00B541D4 /* LaunchScreen.storyboard */,
|
||||
A996BFED22E0586500E7BE42 /* Info.plist */,
|
||||
A96133AF229986DF00B541D4 /* CollectionViewCell.swift */,
|
||||
A9A3496B22D4859200F35AE0 /* SubstModel.swift */,
|
||||
A9C1D30122D7237200139043 /* DataFetcher.swift */,
|
||||
A957A74F22DDC15500E0A2ED /* MenuViewCell.swift */,
|
||||
@@ -449,7 +446,6 @@
|
||||
A96133802299867400B541D4 /* AppDelegate.swift in Sources */,
|
||||
A9A3496C22D4859200F35AE0 /* SubstModel.swift in Sources */,
|
||||
A9C1D30022D656DD00139043 /* MenuViewController.swift in Sources */,
|
||||
A96133B0229986DF00B541D4 /* CollectionViewCell.swift in Sources */,
|
||||
A957A75122DDC15500E0A2ED /* MenuViewCell.swift in Sources */,
|
||||
A9C1D2FE22D656A400139043 /* InfoViewController.swift in Sources */,
|
||||
A9D830A722DE258C00D7EA05 /* PlanViewCell.swift in Sources */,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import CoreData
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
@@ -40,60 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
self.saveContext()
|
||||
}
|
||||
|
||||
// MARK: - Core Data stack
|
||||
|
||||
lazy var persistentContainer: NSPersistentContainer = {
|
||||
/*
|
||||
The persistent container for the application. This implementation
|
||||
creates and returns a container, having loaded the store for the
|
||||
application to it. This property is optional since there are legitimate
|
||||
error conditions that could cause the creation of the store to fail.
|
||||
*/
|
||||
let container = NSPersistentContainer(name: "Model")
|
||||
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
|
||||
if let error = error as NSError? {
|
||||
// Replace this implementation with code to handle the error appropriately.
|
||||
// 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.
|
||||
|
||||
/*
|
||||
Typical reasons for an error here include:
|
||||
* The parent directory does not exist, cannot be created, or disallows writing.
|
||||
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
|
||||
* The device is out of space.
|
||||
* The store could not be migrated to the current model version.
|
||||
Check the error message to determine what the actual problem was.
|
||||
*/
|
||||
fatalError("Unresolved error \(error), \(error.userInfo)")
|
||||
}
|
||||
})
|
||||
return container
|
||||
}()
|
||||
|
||||
// MARK: - Core Data Saving support
|
||||
|
||||
func saveContext () {
|
||||
let context = persistentContainer.viewContext
|
||||
if context.hasChanges {
|
||||
do {
|
||||
try context.save()
|
||||
} catch {
|
||||
// Replace this implementation with code to handle the error appropriately.
|
||||
// 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.
|
||||
let nserror = error as NSError
|
||||
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static var persistentContainer: NSPersistentContainer {
|
||||
return (UIApplication.shared.delegate as! AppDelegate).persistentContainer
|
||||
}
|
||||
|
||||
static var viewContext: NSManagedObjectContext {
|
||||
return persistentContainer.viewContext
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// CollectionViewCell.swift
|
||||
// AvH Plan
|
||||
//
|
||||
// Created by Deniz Duezgoeren on 25.05.19.
|
||||
// Copyright © 2019 Deniz Duezgoeren. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CollectionViewCell: UICollectionViewCell {
|
||||
@IBOutlet weak var group: UILabel!
|
||||
@IBOutlet weak var course: UILabel!
|
||||
@IBOutlet weak var additional: UILabel!
|
||||
@IBOutlet weak var date: UILabel!
|
||||
@IBOutlet weak var time: UILabel!
|
||||
@IBOutlet weak var room: UILabel!
|
||||
@IBOutlet weak var tintView: UIView!
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
InfoPList.strings
|
||||
AvH Plan
|
||||
|
||||
Created by Deniz Duezgoeren on 17.07.19.
|
||||
Copyright © 2019 Deniz Duezgoeren. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
CFBundleDisplayName = "AvH-Plan";
|
||||
CFBundleName = "AvH-Plan";
|
||||
Reference in New Issue
Block a user