From e3bb14f9a0976a88a821a10f033bad0d538cccef Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 2 Feb 2018 22:10:14 -0800 Subject: [PATCH] Create iOS project and add it to workspace. --- .../Evergreen-iOS.xcodeproj/project.pbxproj | 453 ++++++++++++++++++ Evergreen-iOS/Evergreen-iOS/AppDelegate.swift | 61 +++ .../Base.lproj/LaunchScreen.storyboard | 25 + .../Evergreen-iOS/Base.lproj/Main.storyboard | 133 +++++ .../Evergreen-iOS/DetailViewController.swift | 45 ++ Evergreen-iOS/Evergreen-iOS/Info.plist | 55 +++ .../Evergreen-iOS/MasterViewController.swift | 95 ++++ .../Evergreen_iOSTests.swift | 36 ++ Evergreen-iOS/Evergreen-iOSTests/Info.plist | 22 + 9 files changed, 925 insertions(+) create mode 100644 Evergreen-iOS/Evergreen-iOS.xcodeproj/project.pbxproj create mode 100644 Evergreen-iOS/Evergreen-iOS/AppDelegate.swift create mode 100644 Evergreen-iOS/Evergreen-iOS/Base.lproj/LaunchScreen.storyboard create mode 100644 Evergreen-iOS/Evergreen-iOS/Base.lproj/Main.storyboard create mode 100644 Evergreen-iOS/Evergreen-iOS/DetailViewController.swift create mode 100644 Evergreen-iOS/Evergreen-iOS/Info.plist create mode 100644 Evergreen-iOS/Evergreen-iOS/MasterViewController.swift create mode 100644 Evergreen-iOS/Evergreen-iOSTests/Evergreen_iOSTests.swift create mode 100644 Evergreen-iOS/Evergreen-iOSTests/Info.plist diff --git a/Evergreen-iOS/Evergreen-iOS.xcodeproj/project.pbxproj b/Evergreen-iOS/Evergreen-iOS.xcodeproj/project.pbxproj new file mode 100644 index 000000000..0f3f9c464 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS.xcodeproj/project.pbxproj @@ -0,0 +1,453 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 84E3B1622025877000E03C2F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E3B1612025877000E03C2F /* AppDelegate.swift */; }; + 84E3B1642025877000E03C2F /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E3B1632025877000E03C2F /* MasterViewController.swift */; }; + 84E3B1662025877000E03C2F /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E3B1652025877000E03C2F /* DetailViewController.swift */; }; + 84E3B1692025877000E03C2F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84E3B1672025877000E03C2F /* Main.storyboard */; }; + 84E3B16B2025877000E03C2F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84E3B16A2025877000E03C2F /* Assets.xcassets */; }; + 84E3B16E2025877000E03C2F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84E3B16C2025877000E03C2F /* LaunchScreen.storyboard */; }; + 84E3B1792025877000E03C2F /* Evergreen_iOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E3B1782025877000E03C2F /* Evergreen_iOSTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 84E3B1752025877000E03C2F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 84E3B1562025877000E03C2F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 84E3B15D2025877000E03C2F; + remoteInfo = "Evergreen-iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 84E3B15E2025877000E03C2F /* Evergreen-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Evergreen-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 84E3B1612025877000E03C2F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 84E3B1632025877000E03C2F /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = ""; }; + 84E3B1652025877000E03C2F /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; + 84E3B1682025877000E03C2F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 84E3B16A2025877000E03C2F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 84E3B16D2025877000E03C2F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 84E3B16F2025877000E03C2F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 84E3B1742025877000E03C2F /* Evergreen-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Evergreen-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 84E3B1782025877000E03C2F /* Evergreen_iOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Evergreen_iOSTests.swift; sourceTree = ""; }; + 84E3B17A2025877000E03C2F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84E3B15B2025877000E03C2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84E3B1712025877000E03C2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84E3B1552025877000E03C2F = { + isa = PBXGroup; + children = ( + 84E3B1602025877000E03C2F /* Evergreen-iOS */, + 84E3B1772025877000E03C2F /* Evergreen-iOSTests */, + 84E3B15F2025877000E03C2F /* Products */, + ); + sourceTree = ""; + }; + 84E3B15F2025877000E03C2F /* Products */ = { + isa = PBXGroup; + children = ( + 84E3B15E2025877000E03C2F /* Evergreen-iOS.app */, + 84E3B1742025877000E03C2F /* Evergreen-iOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 84E3B1602025877000E03C2F /* Evergreen-iOS */ = { + isa = PBXGroup; + children = ( + 84E3B1612025877000E03C2F /* AppDelegate.swift */, + 84E3B1632025877000E03C2F /* MasterViewController.swift */, + 84E3B1652025877000E03C2F /* DetailViewController.swift */, + 84E3B1672025877000E03C2F /* Main.storyboard */, + 84E3B16A2025877000E03C2F /* Assets.xcassets */, + 84E3B16C2025877000E03C2F /* LaunchScreen.storyboard */, + 84E3B16F2025877000E03C2F /* Info.plist */, + ); + path = "Evergreen-iOS"; + sourceTree = ""; + }; + 84E3B1772025877000E03C2F /* Evergreen-iOSTests */ = { + isa = PBXGroup; + children = ( + 84E3B1782025877000E03C2F /* Evergreen_iOSTests.swift */, + 84E3B17A2025877000E03C2F /* Info.plist */, + ); + path = "Evergreen-iOSTests"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84E3B15D2025877000E03C2F /* Evergreen-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84E3B17D2025877000E03C2F /* Build configuration list for PBXNativeTarget "Evergreen-iOS" */; + buildPhases = ( + 84E3B15A2025877000E03C2F /* Sources */, + 84E3B15B2025877000E03C2F /* Frameworks */, + 84E3B15C2025877000E03C2F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Evergreen-iOS"; + productName = "Evergreen-iOS"; + productReference = 84E3B15E2025877000E03C2F /* Evergreen-iOS.app */; + productType = "com.apple.product-type.application"; + }; + 84E3B1732025877000E03C2F /* Evergreen-iOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84E3B1802025877000E03C2F /* Build configuration list for PBXNativeTarget "Evergreen-iOSTests" */; + buildPhases = ( + 84E3B1702025877000E03C2F /* Sources */, + 84E3B1712025877000E03C2F /* Frameworks */, + 84E3B1722025877000E03C2F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 84E3B1762025877000E03C2F /* PBXTargetDependency */, + ); + name = "Evergreen-iOSTests"; + productName = "Evergreen-iOSTests"; + productReference = 84E3B1742025877000E03C2F /* Evergreen-iOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84E3B1562025877000E03C2F /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = "Ranchero Software, LLC"; + TargetAttributes = { + 84E3B15D2025877000E03C2F = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + 84E3B1732025877000E03C2F = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = 84E3B15D2025877000E03C2F; + }; + }; + }; + buildConfigurationList = 84E3B1592025877000E03C2F /* Build configuration list for PBXProject "Evergreen-iOS" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 84E3B1552025877000E03C2F; + productRefGroup = 84E3B15F2025877000E03C2F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84E3B15D2025877000E03C2F /* Evergreen-iOS */, + 84E3B1732025877000E03C2F /* Evergreen-iOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84E3B15C2025877000E03C2F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84E3B16E2025877000E03C2F /* LaunchScreen.storyboard in Resources */, + 84E3B16B2025877000E03C2F /* Assets.xcassets in Resources */, + 84E3B1692025877000E03C2F /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84E3B1722025877000E03C2F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84E3B15A2025877000E03C2F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84E3B1662025877000E03C2F /* DetailViewController.swift in Sources */, + 84E3B1642025877000E03C2F /* MasterViewController.swift in Sources */, + 84E3B1622025877000E03C2F /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84E3B1702025877000E03C2F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84E3B1792025877000E03C2F /* Evergreen_iOSTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 84E3B1762025877000E03C2F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 84E3B15D2025877000E03C2F /* Evergreen-iOS */; + targetProxy = 84E3B1752025877000E03C2F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 84E3B1672025877000E03C2F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84E3B1682025877000E03C2F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 84E3B16C2025877000E03C2F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84E3B16D2025877000E03C2F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84E3B17B2025877000E03C2F /* 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 84E3B17C2025877000E03C2F /* 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 84E3B17E2025877000E03C2F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = M8L2WTLA8W; + INFOPLIST_FILE = "Evergreen-iOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.Evergreen-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 84E3B17F2025877000E03C2F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = M8L2WTLA8W; + INFOPLIST_FILE = "Evergreen-iOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.Evergreen-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 84E3B1812025877000E03C2F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = M8L2WTLA8W; + INFOPLIST_FILE = "Evergreen-iOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.Evergreen-iOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Evergreen-iOS.app/Evergreen-iOS"; + }; + name = Debug; + }; + 84E3B1822025877000E03C2F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = M8L2WTLA8W; + INFOPLIST_FILE = "Evergreen-iOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.Evergreen-iOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Evergreen-iOS.app/Evergreen-iOS"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84E3B1592025877000E03C2F /* Build configuration list for PBXProject "Evergreen-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84E3B17B2025877000E03C2F /* Debug */, + 84E3B17C2025877000E03C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84E3B17D2025877000E03C2F /* Build configuration list for PBXNativeTarget "Evergreen-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84E3B17E2025877000E03C2F /* Debug */, + 84E3B17F2025877000E03C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84E3B1802025877000E03C2F /* Build configuration list for PBXNativeTarget "Evergreen-iOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84E3B1812025877000E03C2F /* Debug */, + 84E3B1822025877000E03C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84E3B1562025877000E03C2F /* Project object */; +} diff --git a/Evergreen-iOS/Evergreen-iOS/AppDelegate.swift b/Evergreen-iOS/Evergreen-iOS/AppDelegate.swift new file mode 100644 index 000000000..dc7e8d2e4 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS/AppDelegate.swift @@ -0,0 +1,61 @@ +// +// AppDelegate.swift +// Evergreen-iOS +// +// Created by Brent Simmons on 2/2/18. +// Copyright © 2018 Ranchero Software, LLC. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + let splitViewController = window!.rootViewController as! UISplitViewController + let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController + navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem + splitViewController.delegate = self + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + // MARK: - Split view + + func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool { + guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false } + guard let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController else { return false } + if topAsDetailController.detailItem == nil { + // Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded. + return true + } + return false + } + +} + diff --git a/Evergreen-iOS/Evergreen-iOS/Base.lproj/LaunchScreen.storyboard b/Evergreen-iOS/Evergreen-iOS/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f83f6fd58 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Evergreen-iOS/Evergreen-iOS/Base.lproj/Main.storyboard b/Evergreen-iOS/Evergreen-iOS/Base.lproj/Main.storyboard new file mode 100644 index 000000000..d78406541 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS/Base.lproj/Main.storyboard @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Evergreen-iOS/Evergreen-iOS/DetailViewController.swift b/Evergreen-iOS/Evergreen-iOS/DetailViewController.swift new file mode 100644 index 000000000..05f0aef19 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS/DetailViewController.swift @@ -0,0 +1,45 @@ +// +// DetailViewController.swift +// Evergreen-iOS +// +// Created by Brent Simmons on 2/2/18. +// Copyright © 2018 Ranchero Software, LLC. All rights reserved. +// + +import UIKit + +class DetailViewController: UIViewController { + + @IBOutlet weak var detailDescriptionLabel: UILabel! + + + func configureView() { + // Update the user interface for the detail item. + if let detail = detailItem { + if let label = detailDescriptionLabel { + label.text = detail.description + } + } + } + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + configureView() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + var detailItem: NSDate? { + didSet { + // Update the view. + configureView() + } + } + + +} + diff --git a/Evergreen-iOS/Evergreen-iOS/Info.plist b/Evergreen-iOS/Evergreen-iOS/Info.plist new file mode 100644 index 000000000..6873106a5 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS/Info.plist @@ -0,0 +1,55 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Evergreen-iOS/Evergreen-iOS/MasterViewController.swift b/Evergreen-iOS/Evergreen-iOS/MasterViewController.swift new file mode 100644 index 000000000..50909abe9 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOS/MasterViewController.swift @@ -0,0 +1,95 @@ +// +// MasterViewController.swift +// Evergreen-iOS +// +// Created by Brent Simmons on 2/2/18. +// Copyright © 2018 Ranchero Software, LLC. All rights reserved. +// + +import UIKit + +class MasterViewController: UITableViewController { + + var detailViewController: DetailViewController? = nil + var objects = [Any]() + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + navigationItem.leftBarButtonItem = editButtonItem + + let addButton = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(insertNewObject(_:))) + navigationItem.rightBarButtonItem = addButton + if let split = splitViewController { + let controllers = split.viewControllers + detailViewController = (controllers[controllers.count-1] as! UINavigationController).topViewController as? DetailViewController + } + } + + override func viewWillAppear(_ animated: Bool) { + clearsSelectionOnViewWillAppear = splitViewController!.isCollapsed + super.viewWillAppear(animated) + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + @objc + func insertNewObject(_ sender: Any) { + objects.insert(NSDate(), at: 0) + let indexPath = IndexPath(row: 0, section: 0) + tableView.insertRows(at: [indexPath], with: .automatic) + } + + // MARK: - Segues + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "showDetail" { + if let indexPath = tableView.indexPathForSelectedRow { + let object = objects[indexPath.row] as! NSDate + let controller = (segue.destination as! UINavigationController).topViewController as! DetailViewController + controller.detailItem = object + controller.navigationItem.leftBarButtonItem = splitViewController?.displayModeButtonItem + controller.navigationItem.leftItemsSupplementBackButton = true + } + } + } + + // MARK: - Table View + + override func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return objects.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) + + let object = objects[indexPath.row] as! NSDate + cell.textLabel!.text = object.description + return cell + } + + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + objects.remove(at: indexPath.row) + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view. + } + } + + +} + diff --git a/Evergreen-iOS/Evergreen-iOSTests/Evergreen_iOSTests.swift b/Evergreen-iOS/Evergreen-iOSTests/Evergreen_iOSTests.swift new file mode 100644 index 000000000..48c872a6f --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOSTests/Evergreen_iOSTests.swift @@ -0,0 +1,36 @@ +// +// Evergreen_iOSTests.swift +// Evergreen-iOSTests +// +// Created by Brent Simmons on 2/2/18. +// Copyright © 2018 Ranchero Software, LLC. All rights reserved. +// + +import XCTest +@testable import Evergreen_iOS + +class Evergreen_iOSTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Evergreen-iOS/Evergreen-iOSTests/Info.plist b/Evergreen-iOS/Evergreen-iOSTests/Info.plist new file mode 100644 index 000000000..6c40a6cd0 --- /dev/null +++ b/Evergreen-iOS/Evergreen-iOSTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + +