diff --git a/RandomizerGroups/RandomizerGroups.xcodeproj/project.pbxproj b/RandomizerGroups/RandomizerGroups.xcodeproj/project.pbxproj new file mode 100644 index 00000000..2c3a4f0e --- /dev/null +++ b/RandomizerGroups/RandomizerGroups.xcodeproj/project.pbxproj @@ -0,0 +1,435 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 27FAB42E26CFFE4E0061D6A1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB42D26CFFE4E0061D6A1 /* AppDelegate.swift */; }; + 27FAB43026CFFE4E0061D6A1 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB42F26CFFE4E0061D6A1 /* SceneDelegate.swift */; }; + 27FAB43526CFFE4E0061D6A1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27FAB43326CFFE4E0061D6A1 /* Main.storyboard */; }; + 27FAB43826CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB43626CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodeld */; }; + 27FAB43A26CFFE4F0061D6A1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27FAB43926CFFE4F0061D6A1 /* Assets.xcassets */; }; + 27FAB43D26CFFE4F0061D6A1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27FAB43B26CFFE4F0061D6A1 /* LaunchScreen.storyboard */; }; + 27FAB44C26CFFFC70061D6A1 /* CoreDataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB44B26CFFFC70061D6A1 /* CoreDataStack.swift */; }; + 27FAB44E26D0012E0061D6A1 /* RandomizerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB44D26D0012E0061D6A1 /* RandomizerController.swift */; }; + 27FAB45126D004010061D6A1 /* RandomizerGroups+Convenience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB45026D004010061D6A1 /* RandomizerGroups+Convenience.swift */; }; + 27FAB45326D0095D0061D6A1 /* RandomizerTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB45226D0095D0061D6A1 /* RandomizerTableViewController.swift */; }; + 27FAB45526D00EB40061D6A1 /* RandomizerDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FAB45426D00EB40061D6A1 /* RandomizerDetailViewController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 27FAB42A26CFFE4E0061D6A1 /* RandomizerGroups.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RandomizerGroups.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 27FAB42D26CFFE4E0061D6A1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 27FAB42F26CFFE4E0061D6A1 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 27FAB43426CFFE4E0061D6A1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 27FAB43726CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = RandomizerGroups.xcdatamodel; sourceTree = ""; }; + 27FAB43926CFFE4F0061D6A1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 27FAB43C26CFFE4F0061D6A1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 27FAB43E26CFFE4F0061D6A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 27FAB44B26CFFFC70061D6A1 /* CoreDataStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataStack.swift; sourceTree = ""; }; + 27FAB44D26D0012E0061D6A1 /* RandomizerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomizerController.swift; sourceTree = ""; }; + 27FAB45026D004010061D6A1 /* RandomizerGroups+Convenience.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RandomizerGroups+Convenience.swift"; sourceTree = ""; }; + 27FAB45226D0095D0061D6A1 /* RandomizerTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomizerTableViewController.swift; sourceTree = ""; }; + 27FAB45426D00EB40061D6A1 /* RandomizerDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomizerDetailViewController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 27FAB42726CFFE4E0061D6A1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27FAB42126CFFE4E0061D6A1 = { + isa = PBXGroup; + children = ( + 27FAB42C26CFFE4E0061D6A1 /* RandomizerGroups */, + 27FAB42B26CFFE4E0061D6A1 /* Products */, + ); + sourceTree = ""; + }; + 27FAB42B26CFFE4E0061D6A1 /* Products */ = { + isa = PBXGroup; + children = ( + 27FAB42A26CFFE4E0061D6A1 /* RandomizerGroups.app */, + ); + name = Products; + sourceTree = ""; + }; + 27FAB42C26CFFE4E0061D6A1 /* RandomizerGroups */ = { + isa = PBXGroup; + children = ( + 27FAB44526CFFF390061D6A1 /* CoreData */, + 27FAB44626CFFF470061D6A1 /* Controllers */, + 27FAB44926CFFF590061D6A1 /* Views */, + 27FAB44426CFFE690061D6A1 /* Resources */, + ); + path = RandomizerGroups; + sourceTree = ""; + }; + 27FAB44426CFFE690061D6A1 /* Resources */ = { + isa = PBXGroup; + children = ( + 27FAB42D26CFFE4E0061D6A1 /* AppDelegate.swift */, + 27FAB42F26CFFE4E0061D6A1 /* SceneDelegate.swift */, + 27FAB43926CFFE4F0061D6A1 /* Assets.xcassets */, + 27FAB43E26CFFE4F0061D6A1 /* Info.plist */, + ); + path = Resources; + sourceTree = ""; + }; + 27FAB44526CFFF390061D6A1 /* CoreData */ = { + isa = PBXGroup; + children = ( + 27FAB43626CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodeld */, + 27FAB44B26CFFFC70061D6A1 /* CoreDataStack.swift */, + 27FAB45026D004010061D6A1 /* RandomizerGroups+Convenience.swift */, + ); + path = CoreData; + sourceTree = ""; + }; + 27FAB44626CFFF470061D6A1 /* Controllers */ = { + isa = PBXGroup; + children = ( + 27FAB44826CFFF510061D6A1 /* ModelController */, + 27FAB44726CFFF4B0061D6A1 /* ViewControllers */, + ); + path = Controllers; + sourceTree = ""; + }; + 27FAB44726CFFF4B0061D6A1 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 27FAB45226D0095D0061D6A1 /* RandomizerTableViewController.swift */, + 27FAB45426D00EB40061D6A1 /* RandomizerDetailViewController.swift */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 27FAB44826CFFF510061D6A1 /* ModelController */ = { + isa = PBXGroup; + children = ( + 27FAB44D26D0012E0061D6A1 /* RandomizerController.swift */, + ); + path = ModelController; + sourceTree = ""; + }; + 27FAB44926CFFF590061D6A1 /* Views */ = { + isa = PBXGroup; + children = ( + 27FAB44A26CFFF5C0061D6A1 /* Storyboard */, + ); + path = Views; + sourceTree = ""; + }; + 27FAB44A26CFFF5C0061D6A1 /* Storyboard */ = { + isa = PBXGroup; + children = ( + 27FAB43326CFFE4E0061D6A1 /* Main.storyboard */, + 27FAB43B26CFFE4F0061D6A1 /* LaunchScreen.storyboard */, + ); + path = Storyboard; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 27FAB42926CFFE4E0061D6A1 /* RandomizerGroups */ = { + isa = PBXNativeTarget; + buildConfigurationList = 27FAB44126CFFE4F0061D6A1 /* Build configuration list for PBXNativeTarget "RandomizerGroups" */; + buildPhases = ( + 27FAB42626CFFE4E0061D6A1 /* Sources */, + 27FAB42726CFFE4E0061D6A1 /* Frameworks */, + 27FAB42826CFFE4E0061D6A1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RandomizerGroups; + productName = RandomizerGroups; + productReference = 27FAB42A26CFFE4E0061D6A1 /* RandomizerGroups.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 27FAB42226CFFE4E0061D6A1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 27FAB42926CFFE4E0061D6A1 = { + CreatedOnToolsVersion = 12.5.1; + }; + }; + }; + buildConfigurationList = 27FAB42526CFFE4E0061D6A1 /* Build configuration list for PBXProject "RandomizerGroups" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 27FAB42126CFFE4E0061D6A1; + productRefGroup = 27FAB42B26CFFE4E0061D6A1 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 27FAB42926CFFE4E0061D6A1 /* RandomizerGroups */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 27FAB42826CFFE4E0061D6A1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27FAB43D26CFFE4F0061D6A1 /* LaunchScreen.storyboard in Resources */, + 27FAB43A26CFFE4F0061D6A1 /* Assets.xcassets in Resources */, + 27FAB43526CFFE4E0061D6A1 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 27FAB42626CFFE4E0061D6A1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27FAB45326D0095D0061D6A1 /* RandomizerTableViewController.swift in Sources */, + 27FAB44C26CFFFC70061D6A1 /* CoreDataStack.swift in Sources */, + 27FAB43826CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodeld in Sources */, + 27FAB42E26CFFE4E0061D6A1 /* AppDelegate.swift in Sources */, + 27FAB45526D00EB40061D6A1 /* RandomizerDetailViewController.swift in Sources */, + 27FAB44E26D0012E0061D6A1 /* RandomizerController.swift in Sources */, + 27FAB45126D004010061D6A1 /* RandomizerGroups+Convenience.swift in Sources */, + 27FAB43026CFFE4E0061D6A1 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 27FAB43326CFFE4E0061D6A1 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 27FAB43426CFFE4E0061D6A1 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 27FAB43B26CFFE4F0061D6A1 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 27FAB43C26CFFE4F0061D6A1 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 27FAB43F26CFFE4F0061D6A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 27FAB44026CFFE4F0061D6A1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 27FAB44226CFFE4F0061D6A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = L97V4TW6MB; + INFOPLIST_FILE = RandomizerGroups/Resources/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.KyleWarren.RandomizerGroups; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 27FAB44326CFFE4F0061D6A1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = L97V4TW6MB; + INFOPLIST_FILE = RandomizerGroups/Resources/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.KyleWarren.RandomizerGroups; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 27FAB42526CFFE4E0061D6A1 /* Build configuration list for PBXProject "RandomizerGroups" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27FAB43F26CFFE4F0061D6A1 /* Debug */, + 27FAB44026CFFE4F0061D6A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 27FAB44126CFFE4F0061D6A1 /* Build configuration list for PBXNativeTarget "RandomizerGroups" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27FAB44226CFFE4F0061D6A1 /* Debug */, + 27FAB44326CFFE4F0061D6A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 27FAB43626CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 27FAB43726CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodel */, + ); + currentVersion = 27FAB43726CFFE4E0061D6A1 /* RandomizerGroups.xcdatamodel */; + path = RandomizerGroups.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 27FAB42226CFFE4E0061D6A1 /* Project object */; +} diff --git a/RandomizerGroups/RandomizerGroups.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RandomizerGroups/RandomizerGroups.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RandomizerGroups/RandomizerGroups.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RandomizerGroups/RandomizerGroups.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RandomizerGroups/RandomizerGroups/Controllers/ModelController/RandomizerController.swift b/RandomizerGroups/RandomizerGroups/Controllers/ModelController/RandomizerController.swift new file mode 100644 index 00000000..19fde081 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Controllers/ModelController/RandomizerController.swift @@ -0,0 +1,44 @@ +// +// RandomizerController.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import CoreData + +class RandomizerController { + + static let shared = RandomizerController() + + var people: [Person] = [] + + //MARK: - CRUD + + func createPersonWith(name: String){ + let newPerson = Person(name: name) + people.append(newPerson) + + CoreDataStack.saveContext() + } + + func update(person: Person, name: String) { + person.name = name + + CoreDataStack.saveContext() + } + + func toggleIsGrouped(person: Person) { + person.isGrouped.toggle() + + CoreDataStack.saveContext() + } + + func deletePerson(person: Person) { + guard let index = people.firstIndex(of: person) else { return } + people.remove(at: index) + + CoreDataStack.context.delete(person) + CoreDataStack.saveContext() + } +} // End of Class diff --git a/RandomizerGroups/RandomizerGroups/Controllers/ViewControllers/RandomizerDetailViewController.swift b/RandomizerGroups/RandomizerGroups/Controllers/ViewControllers/RandomizerDetailViewController.swift new file mode 100644 index 00000000..bbdc799c --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Controllers/ViewControllers/RandomizerDetailViewController.swift @@ -0,0 +1,45 @@ +// +// RandomizerDetailViewController.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import UIKit + +class RandomizerDetailViewController: UIViewController { + + //MARK: - OUTLETS + @IBOutlet weak var nameTextField: UITextField! + + + //MARK: - PROPERTIES + var people: Person? + + //MARK: - LIFECYCLES + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + //MARK: - ACTIONS + @IBAction func saveButtonTapped(_ sender: Any) { + guard let name = nameTextField.text, !name.isEmpty else { return } + + if let people = people { + RandomizerController.shared.update(person: people, name: name) + } else { + RandomizerController.shared.createPersonWith(name: name) + } + navigationController?.popViewController(animated: true) + } + + func updateViews() { + guard let people = people else { return } + nameTextField.text = people.name + } + + +} diff --git a/RandomizerGroups/RandomizerGroups/Controllers/ViewControllers/RandomizerTableViewController.swift b/RandomizerGroups/RandomizerGroups/Controllers/ViewControllers/RandomizerTableViewController.swift new file mode 100644 index 00000000..68002850 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Controllers/ViewControllers/RandomizerTableViewController.swift @@ -0,0 +1,60 @@ +// +// RandomizerTableViewController.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import UIKit + +class RandomizerTableViewController: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(true) + tableView.reloadData() + } + + // MARK: - Table view data source + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + + return RandomizerController.shared.people.count + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "personCell", for: indexPath) + + let person = RandomizerController.shared.people[indexPath.row] + cell.textLabel?.text = person.name + + return cell + } + + + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + let personToDelete = RandomizerController.shared.people[indexPath.row] + RandomizerController.shared.deletePerson(person: personToDelete) + + tableView.deleteRows(at: [indexPath], with: .fade) + + } + } + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/RandomizerGroups/RandomizerGroups/CoreData/CoreDataStack.swift b/RandomizerGroups/RandomizerGroups/CoreData/CoreDataStack.swift new file mode 100644 index 00000000..37156f51 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/CoreData/CoreDataStack.swift @@ -0,0 +1,39 @@ +// +// CoreDataStack.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import CoreData + +enum CoreDataStack { + + static let container: NSPersistentContainer = { + + let container = NSPersistentContainer(name: "RandomizerGroups") + + container.loadPersistentStores { storeDescription, error in + if let error = error { + fatalError("Error loading persistent stores \(error)") + } + } + return container + }() + + static var context: NSManagedObjectContext { + container.viewContext + } + + static func saveContext() { + if context.hasChanges { + do{ + try context.save() + } catch { + print("Error saving context \(error)") + } + } + } + +} // End of enum + diff --git a/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups+Convenience.swift b/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups+Convenience.swift new file mode 100644 index 00000000..32f01d40 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups+Convenience.swift @@ -0,0 +1,18 @@ +// +// RandomizerGroups+Convenience.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import CoreData + +extension Person { + + @discardableResult + convenience init(name: String, isGrouped: Bool = false, context: NSManagedObjectContext = CoreDataStack.context) { + self.init(context: context) + self.name = name + self.isGrouped = isGrouped + } +} diff --git a/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups.xcdatamodeld/.xccurrentversion b/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..1bd9b2a2 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + RandomizerGroups.xcdatamodel + + diff --git a/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups.xcdatamodeld/RandomizerGroups.xcdatamodel/contents b/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups.xcdatamodeld/RandomizerGroups.xcdatamodel/contents new file mode 100644 index 00000000..b7b302b8 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/CoreData/RandomizerGroups.xcdatamodeld/RandomizerGroups.xcdatamodel/contents @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/RandomizerGroups/RandomizerGroups/Resources/AppDelegate.swift b/RandomizerGroups/RandomizerGroups/Resources/AppDelegate.swift new file mode 100644 index 00000000..38e67dc0 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Resources/AppDelegate.swift @@ -0,0 +1,81 @@ +// +// AppDelegate.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import UIKit +import CoreData + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + // 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: "RandomizerGroups") + 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)") + } + } + } + +} + diff --git a/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9221b9bb --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/Contents.json b/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Resources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RandomizerGroups/RandomizerGroups/Resources/Info.plist b/RandomizerGroups/RandomizerGroups/Resources/Info.plist new file mode 100644 index 00000000..5b531f7b --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Resources/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/RandomizerGroups/RandomizerGroups/Resources/SceneDelegate.swift b/RandomizerGroups/RandomizerGroups/Resources/SceneDelegate.swift new file mode 100644 index 00000000..7eba099d --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Resources/SceneDelegate.swift @@ -0,0 +1,55 @@ +// +// SceneDelegate.swift +// RandomizerGroups +// +// Created by Kyle Warren on 8/20/21. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + + // Save changes in the application's managed object context when the application transitions to the background. + (UIApplication.shared.delegate as? AppDelegate)?.saveContext() + } + + +} + diff --git a/RandomizerGroups/RandomizerGroups/Views/Storyboard/Base.lproj/LaunchScreen.storyboard b/RandomizerGroups/RandomizerGroups/Views/Storyboard/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Views/Storyboard/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RandomizerGroups/RandomizerGroups/Views/Storyboard/Base.lproj/Main.storyboard b/RandomizerGroups/RandomizerGroups/Views/Storyboard/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f014bc44 --- /dev/null +++ b/RandomizerGroups/RandomizerGroups/Views/Storyboard/Base.lproj/Main.storyboard @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +