From df580a2361cb0af744d83b10374634bd6ce16f1e Mon Sep 17 00:00:00 2001 From: Robert Vance Date: Fri, 6 Nov 2020 20:25:37 -0700 Subject: [PATCH 1/3] Added project file and hooked up outlets --- .../Experiences.xcodeproj/project.pbxproj | 398 ++++++++++++++++++ Experiences/Experiences/AppDelegate.swift | 36 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 98 +++++ .../Experiences/Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Experiences/Base.lproj/Main.storyboard | 195 +++++++++ Experiences/Experiences/Info.plist | 74 ++++ .../ExperienceController.swift | 19 + .../Experiences/Model/Experience.swift | 28 ++ Experiences/Experiences/SceneDelegate.swift | 52 +++ .../View Controllers/MapViewController.swift | 36 ++ .../NewExperienceViewController.swift | 43 ++ .../VideoRecorderViewController.swift | 40 ++ .../Experiences/Views/CameraViewPreview.swift | 25 ++ 15 files changed, 1086 insertions(+) create mode 100644 Experiences/Experiences.xcodeproj/project.pbxproj create mode 100644 Experiences/Experiences/AppDelegate.swift create mode 100644 Experiences/Experiences/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Experiences/Experiences/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Experiences/Experiences/Assets.xcassets/Contents.json create mode 100644 Experiences/Experiences/Base.lproj/LaunchScreen.storyboard create mode 100644 Experiences/Experiences/Base.lproj/Main.storyboard create mode 100644 Experiences/Experiences/Info.plist create mode 100644 Experiences/Experiences/Model Controller/ExperienceController.swift create mode 100644 Experiences/Experiences/Model/Experience.swift create mode 100644 Experiences/Experiences/SceneDelegate.swift create mode 100644 Experiences/Experiences/View Controllers/MapViewController.swift create mode 100644 Experiences/Experiences/View Controllers/NewExperienceViewController.swift create mode 100644 Experiences/Experiences/View Controllers/VideoRecorderViewController.swift create mode 100644 Experiences/Experiences/Views/CameraViewPreview.swift diff --git a/Experiences/Experiences.xcodeproj/project.pbxproj b/Experiences/Experiences.xcodeproj/project.pbxproj new file mode 100644 index 00000000..6de933c5 --- /dev/null +++ b/Experiences/Experiences.xcodeproj/project.pbxproj @@ -0,0 +1,398 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + E4FEB3A225563AF90004609D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3A125563AF90004609D /* AppDelegate.swift */; }; + E4FEB3A425563AF90004609D /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3A325563AF90004609D /* SceneDelegate.swift */; }; + E4FEB3A925563AF90004609D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E4FEB3A725563AF90004609D /* Main.storyboard */; }; + E4FEB3AB25563AFD0004609D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E4FEB3AA25563AFD0004609D /* Assets.xcassets */; }; + E4FEB3AE25563AFD0004609D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E4FEB3AC25563AFD0004609D /* LaunchScreen.storyboard */; }; + E4FEB3B9255642A00004609D /* VideoRecorderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3B8255642A00004609D /* VideoRecorderViewController.swift */; }; + E4FEB3BD255642BF0004609D /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3BC255642BF0004609D /* MapViewController.swift */; }; + E4FEB3C0255642DA0004609D /* NewExperienceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3BF255642DA0004609D /* NewExperienceViewController.swift */; }; + E4FEB3C42556430F0004609D /* CameraViewPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3C32556430F0004609D /* CameraViewPreview.swift */; }; + E4FEB3C8255643720004609D /* ExperienceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3C7255643720004609D /* ExperienceController.swift */; }; + E4FEB3CD255643C10004609D /* Experience.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3CC255643C10004609D /* Experience.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E4FEB39E25563AF90004609D /* Experiences.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Experiences.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E4FEB3A125563AF90004609D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + E4FEB3A325563AF90004609D /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + E4FEB3A825563AF90004609D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + E4FEB3AA25563AFD0004609D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E4FEB3AD25563AFD0004609D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E4FEB3AF25563AFD0004609D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E4FEB3B8255642A00004609D /* VideoRecorderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRecorderViewController.swift; sourceTree = ""; }; + E4FEB3BC255642BF0004609D /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = ""; }; + E4FEB3BF255642DA0004609D /* NewExperienceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewExperienceViewController.swift; sourceTree = ""; }; + E4FEB3C32556430F0004609D /* CameraViewPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewPreview.swift; sourceTree = ""; }; + E4FEB3C7255643720004609D /* ExperienceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExperienceController.swift; sourceTree = ""; }; + E4FEB3CC255643C10004609D /* Experience.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Experience.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E4FEB39B25563AF90004609D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E4FEB39525563AF90004609D = { + isa = PBXGroup; + children = ( + E4FEB3A025563AF90004609D /* Experiences */, + E4FEB39F25563AF90004609D /* Products */, + ); + sourceTree = ""; + }; + E4FEB39F25563AF90004609D /* Products */ = { + isa = PBXGroup; + children = ( + E4FEB39E25563AF90004609D /* Experiences.app */, + ); + name = Products; + sourceTree = ""; + }; + E4FEB3A025563AF90004609D /* Experiences */ = { + isa = PBXGroup; + children = ( + E4FEB3CB255643B00004609D /* Model */, + E4FEB3C62556434E0004609D /* Model Controller */, + E4FEB3C2255642F70004609D /* Views */, + E4FEB3B72556427A0004609D /* View Controllers */, + E4FEB3A125563AF90004609D /* AppDelegate.swift */, + E4FEB3A325563AF90004609D /* SceneDelegate.swift */, + E4FEB3A725563AF90004609D /* Main.storyboard */, + E4FEB3AA25563AFD0004609D /* Assets.xcassets */, + E4FEB3AC25563AFD0004609D /* LaunchScreen.storyboard */, + E4FEB3AF25563AFD0004609D /* Info.plist */, + ); + path = Experiences; + sourceTree = ""; + }; + E4FEB3B72556427A0004609D /* View Controllers */ = { + isa = PBXGroup; + children = ( + E4FEB3B8255642A00004609D /* VideoRecorderViewController.swift */, + E4FEB3BC255642BF0004609D /* MapViewController.swift */, + E4FEB3BF255642DA0004609D /* NewExperienceViewController.swift */, + ); + path = "View Controllers"; + sourceTree = ""; + }; + E4FEB3C2255642F70004609D /* Views */ = { + isa = PBXGroup; + children = ( + E4FEB3C32556430F0004609D /* CameraViewPreview.swift */, + ); + path = Views; + sourceTree = ""; + }; + E4FEB3C62556434E0004609D /* Model Controller */ = { + isa = PBXGroup; + children = ( + E4FEB3C7255643720004609D /* ExperienceController.swift */, + ); + path = "Model Controller"; + sourceTree = ""; + }; + E4FEB3CB255643B00004609D /* Model */ = { + isa = PBXGroup; + children = ( + E4FEB3CC255643C10004609D /* Experience.swift */, + ); + path = Model; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E4FEB39D25563AF90004609D /* Experiences */ = { + isa = PBXNativeTarget; + buildConfigurationList = E4FEB3B225563AFD0004609D /* Build configuration list for PBXNativeTarget "Experiences" */; + buildPhases = ( + E4FEB39A25563AF90004609D /* Sources */, + E4FEB39B25563AF90004609D /* Frameworks */, + E4FEB39C25563AF90004609D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Experiences; + productName = Experiences; + productReference = E4FEB39E25563AF90004609D /* Experiences.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E4FEB39625563AF90004609D /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1200; + LastUpgradeCheck = 1200; + TargetAttributes = { + E4FEB39D25563AF90004609D = { + CreatedOnToolsVersion = 12.0.1; + }; + }; + }; + buildConfigurationList = E4FEB39925563AF90004609D /* Build configuration list for PBXProject "Experiences" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E4FEB39525563AF90004609D; + productRefGroup = E4FEB39F25563AF90004609D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E4FEB39D25563AF90004609D /* Experiences */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E4FEB39C25563AF90004609D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4FEB3AE25563AFD0004609D /* LaunchScreen.storyboard in Resources */, + E4FEB3AB25563AFD0004609D /* Assets.xcassets in Resources */, + E4FEB3A925563AF90004609D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E4FEB39A25563AF90004609D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4FEB3C42556430F0004609D /* CameraViewPreview.swift in Sources */, + E4FEB3B9255642A00004609D /* VideoRecorderViewController.swift in Sources */, + E4FEB3A225563AF90004609D /* AppDelegate.swift in Sources */, + E4FEB3CD255643C10004609D /* Experience.swift in Sources */, + E4FEB3A425563AF90004609D /* SceneDelegate.swift in Sources */, + E4FEB3C0255642DA0004609D /* NewExperienceViewController.swift in Sources */, + E4FEB3BD255642BF0004609D /* MapViewController.swift in Sources */, + E4FEB3C8255643720004609D /* ExperienceController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + E4FEB3A725563AF90004609D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E4FEB3A825563AF90004609D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + E4FEB3AC25563AFD0004609D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E4FEB3AD25563AFD0004609D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E4FEB3B025563AFD0004609D /* 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.0; + 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; + }; + E4FEB3B125563AFD0004609D /* 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.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E4FEB3B325563AFD0004609D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4487ZJU795; + INFOPLIST_FILE = Experiences/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.robvance.Experiences; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E4FEB3B425563AFD0004609D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4487ZJU795; + INFOPLIST_FILE = Experiences/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.robvance.Experiences; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E4FEB39925563AF90004609D /* Build configuration list for PBXProject "Experiences" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4FEB3B025563AFD0004609D /* Debug */, + E4FEB3B125563AFD0004609D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E4FEB3B225563AFD0004609D /* Build configuration list for PBXNativeTarget "Experiences" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4FEB3B325563AFD0004609D /* Debug */, + E4FEB3B425563AFD0004609D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E4FEB39625563AF90004609D /* Project object */; +} diff --git a/Experiences/Experiences/AppDelegate.swift b/Experiences/Experiences/AppDelegate.swift new file mode 100644 index 00000000..46a097f1 --- /dev/null +++ b/Experiences/Experiences/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit + +@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. + } + + +} + diff --git a/Experiences/Experiences/Assets.xcassets/AccentColor.colorset/Contents.json b/Experiences/Experiences/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/Experiences/Experiences/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Experiences/Experiences/Assets.xcassets/AppIcon.appiconset/Contents.json b/Experiences/Experiences/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9221b9bb --- /dev/null +++ b/Experiences/Experiences/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/Experiences/Experiences/Assets.xcassets/Contents.json b/Experiences/Experiences/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Experiences/Experiences/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Experiences/Experiences/Base.lproj/LaunchScreen.storyboard b/Experiences/Experiences/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/Experiences/Experiences/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Experiences/Experiences/Base.lproj/Main.storyboard b/Experiences/Experiences/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f322dce3 --- /dev/null +++ b/Experiences/Experiences/Base.lproj/Main.storyboard @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Experiences/Experiences/Info.plist b/Experiences/Experiences/Info.plist new file mode 100644 index 00000000..3447ec99 --- /dev/null +++ b/Experiences/Experiences/Info.plist @@ -0,0 +1,74 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + NSCameraUsageDescription + $(PRODUCT_NAME) uses camera to capture images and video + NSMicrophoneUsageDescription + $(PRODUCT_NAME) uses microphone to capture audio + NSPhotoLibraryUsageDescription + $(PRODUCT_NAME) needs access to your library to add to an experience + NSLocationWhenInUseUsageDescription + $(PRODUCT_NAME) uses GPS to allow the user to see their current location + 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/Experiences/Experiences/Model Controller/ExperienceController.swift b/Experiences/Experiences/Model Controller/ExperienceController.swift new file mode 100644 index 00000000..2212e30b --- /dev/null +++ b/Experiences/Experiences/Model Controller/ExperienceController.swift @@ -0,0 +1,19 @@ +// +// ExperienceController.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit +import MapKit + +class ExperienceController { + + static let shared = ExperienceController() + var experiences: [MKAnnotation] = [] + + func addExperence(_ newExperience: Experience) { + experiences.append(newExperience) + } +} diff --git a/Experiences/Experiences/Model/Experience.swift b/Experiences/Experiences/Model/Experience.swift new file mode 100644 index 00000000..968e57fa --- /dev/null +++ b/Experiences/Experiences/Model/Experience.swift @@ -0,0 +1,28 @@ +// +// Experience.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit +import MapKit + +class Experience: NSObject, MKAnnotation { + + let experienceTitle: String + let image: UIImage + let audioRecordingURL: URL + + var coordinate: CLLocationCoordinate2D + var title: String? { + return experienceTitle + } + + init(experienceTitle: String, image: UIImage, audioRecordingURL: URL, coordinate: CLLocationCoordinate2D) { + self.experienceTitle = experienceTitle + self.image = image + self.audioRecordingURL = audioRecordingURL + self.coordinate = coordinate + } +} diff --git a/Experiences/Experiences/SceneDelegate.swift b/Experiences/Experiences/SceneDelegate.swift new file mode 100644 index 00000000..605957f0 --- /dev/null +++ b/Experiences/Experiences/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +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. + } + + +} + diff --git a/Experiences/Experiences/View Controllers/MapViewController.swift b/Experiences/Experiences/View Controllers/MapViewController.swift new file mode 100644 index 00000000..98ea3be0 --- /dev/null +++ b/Experiences/Experiences/View Controllers/MapViewController.swift @@ -0,0 +1,36 @@ +// +// MapViewController.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit +import MapKit +import CoreLocation + +class MapViewController: UIViewController { + + // Mark: - Properties - + let experienceController = ExperienceController.shared + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + mapView.showAnnotations(experienceController.experiences, animated: true) + } + + // MARK: - IBOutlets - + @IBOutlet weak var mapView: MKMapView! + + + + /* + // 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/Experiences/Experiences/View Controllers/NewExperienceViewController.swift b/Experiences/Experiences/View Controllers/NewExperienceViewController.swift new file mode 100644 index 00000000..1dc4e375 --- /dev/null +++ b/Experiences/Experiences/View Controllers/NewExperienceViewController.swift @@ -0,0 +1,43 @@ +// +// NewExperienceViewController.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit + +class NewExperienceViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + // MARK: - IBOutlets - + @IBOutlet weak var titleTextField: UITextField! + + @IBOutlet weak var imageView: UIImageView! + @IBOutlet weak var chooseImageButton: UIButton! + + @IBOutlet weak var recordButton: UIButton! + @IBOutlet weak var playButton: UIButton! + + + + + + + + /* + // 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/Experiences/Experiences/View Controllers/VideoRecorderViewController.swift b/Experiences/Experiences/View Controllers/VideoRecorderViewController.swift new file mode 100644 index 00000000..08c594b3 --- /dev/null +++ b/Experiences/Experiences/View Controllers/VideoRecorderViewController.swift @@ -0,0 +1,40 @@ +// +// VideoRecorderViewController.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit + +class VideoRecorderViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + // MARK: - IBOutlets - + @IBOutlet weak var cameraView: CameraPreviewView! + @IBOutlet weak var recordButton: UIButton! + + // MARK: - IBActions - + + @IBAction func recordButtonTapped(_ sender: UIButton) { + } + @IBAction func saveButtonTapped(_ sender: UIBarButtonItem) { + } + + + /* + // 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/Experiences/Experiences/Views/CameraViewPreview.swift b/Experiences/Experiences/Views/CameraViewPreview.swift new file mode 100644 index 00000000..c03295d1 --- /dev/null +++ b/Experiences/Experiences/Views/CameraViewPreview.swift @@ -0,0 +1,25 @@ +// +// CameraViewPreview.swift +// Experiences +// +// Created by Rob Vance on 11/6/20. +// + +import UIKit +import AVFoundation + +class CameraPreviewView: UIView { + + override class var layerClass: AnyClass { + return AVCaptureVideoPreviewLayer.self + } + + var videoPreviewLayer: AVCaptureVideoPreviewLayer { + return layer as! AVCaptureVideoPreviewLayer + } + + var session: AVCaptureSession? { + get { return videoPreviewLayer.session } + set { videoPreviewLayer.session = newValue } + } +} From 74960e81098a7975f6dc5801b24b52781012d04e Mon Sep 17 00:00:00 2001 From: Robert Vance Date: Fri, 6 Nov 2020 21:17:32 -0700 Subject: [PATCH 2/3] Added image filters and completed image part --- .../Experiences.xcodeproj/project.pbxproj | 4 ++ .../Experiences/Base.lproj/Main.storyboard | 9 +-- .../ImageFilterController.swift | 48 +++++++++++++ .../NewExperienceViewController.swift | 69 +++++++++++++++++++ 4 files changed, 126 insertions(+), 4 deletions(-) create mode 100644 Experiences/Experiences/Model Controller/ImageFilterController.swift diff --git a/Experiences/Experiences.xcodeproj/project.pbxproj b/Experiences/Experiences.xcodeproj/project.pbxproj index 6de933c5..626d56d6 100644 --- a/Experiences/Experiences.xcodeproj/project.pbxproj +++ b/Experiences/Experiences.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ E4FEB3C42556430F0004609D /* CameraViewPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3C32556430F0004609D /* CameraViewPreview.swift */; }; E4FEB3C8255643720004609D /* ExperienceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3C7255643720004609D /* ExperienceController.swift */; }; E4FEB3CD255643C10004609D /* Experience.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3CC255643C10004609D /* Experience.swift */; }; + E4FEB3D2255651A60004609D /* ImageFilterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4FEB3D1255651A60004609D /* ImageFilterController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -34,6 +35,7 @@ E4FEB3C32556430F0004609D /* CameraViewPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewPreview.swift; sourceTree = ""; }; E4FEB3C7255643720004609D /* ExperienceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExperienceController.swift; sourceTree = ""; }; E4FEB3CC255643C10004609D /* Experience.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Experience.swift; sourceTree = ""; }; + E4FEB3D1255651A60004609D /* ImageFilterController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFilterController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -102,6 +104,7 @@ isa = PBXGroup; children = ( E4FEB3C7255643720004609D /* ExperienceController.swift */, + E4FEB3D1255651A60004609D /* ImageFilterController.swift */, ); path = "Model Controller"; sourceTree = ""; @@ -185,6 +188,7 @@ buildActionMask = 2147483647; files = ( E4FEB3C42556430F0004609D /* CameraViewPreview.swift in Sources */, + E4FEB3D2255651A60004609D /* ImageFilterController.swift in Sources */, E4FEB3B9255642A00004609D /* VideoRecorderViewController.swift in Sources */, E4FEB3A225563AF90004609D /* AppDelegate.swift in Sources */, E4FEB3CD255643C10004609D /* Experience.swift in Sources */, diff --git a/Experiences/Experiences/Base.lproj/Main.storyboard b/Experiences/Experiences/Base.lproj/Main.storyboard index f322dce3..ecb58e09 100644 --- a/Experiences/Experiences/Base.lproj/Main.storyboard +++ b/Experiences/Experiences/Base.lproj/Main.storyboard @@ -70,9 +70,6 @@ - - -