diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db8d09f --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Xcode +screenshot_* +.irb-history +.DS_Store +*/build/* +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.moved-aside +DerivedData +.idea/ +.vscode/ +*.hmap +*.xccheckout +*.xcuserstate +build/* +Pods/* +Trac.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..e1707e9 --- /dev/null +++ b/Podfile @@ -0,0 +1,9 @@ +platform :ios, '12.0' + +target 'TracMobility' do + use_frameworks! + + pod 'GoogleSignIn' + pod 'GoogleMaps','~> 4.0.0' + +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..3284ce3 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,46 @@ +PODS: + - AppAuth (1.4.0): + - AppAuth/Core (= 1.4.0) + - AppAuth/ExternalUserAgent (= 1.4.0) + - AppAuth/Core (1.4.0) + - AppAuth/ExternalUserAgent (1.4.0) + - GoogleMaps (4.0.0): + - GoogleMaps/Maps (= 4.0.0) + - GoogleMaps/Base (4.0.0) + - GoogleMaps/Maps (4.0.0): + - GoogleMaps/Base + - GoogleSignIn (5.0.2): + - AppAuth (~> 1.2) + - GTMAppAuth (~> 1.0) + - GTMSessionFetcher/Core (~> 1.1) + - GTMAppAuth (1.1.0): + - AppAuth/Core (~> 1.4) + - GTMSessionFetcher (~> 1.4) + - GTMSessionFetcher (1.5.0): + - GTMSessionFetcher/Full (= 1.5.0) + - GTMSessionFetcher/Core (1.5.0) + - GTMSessionFetcher/Full (1.5.0): + - GTMSessionFetcher/Core (= 1.5.0) + +DEPENDENCIES: + - GoogleMaps (~> 4.0.0) + - GoogleSignIn + +SPEC REPOS: + trunk: + - AppAuth + - GoogleMaps + - GoogleSignIn + - GTMAppAuth + - GTMSessionFetcher + +SPEC CHECKSUMS: + AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 + GoogleMaps: b7f7fc569a9b354a3af0d9729dbec40957b7d41e + GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 + GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9 + GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 + +PODFILE CHECKSUM: 4fc49cffc75fad4a1e35dde53564c9cf5a0ea5ec + +COCOAPODS: 1.10.0 diff --git a/TracMobility.xcodeproj/project.pbxproj b/TracMobility.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d99266c --- /dev/null +++ b/TracMobility.xcodeproj/project.pbxproj @@ -0,0 +1,470 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 1A7821BC25DC544900245833 /* AuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A7821BB25DC544900245833 /* AuthViewController.swift */; }; + 1A7821C725DC58E400245833 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1A7821C625DC58E400245833 /* GoogleService-Info.plist */; }; + 1A7821CD25DC5C5100245833 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A7821CC25DC5C5100245833 /* MapViewController.swift */; }; + 1A7821FC25DD598F00245833 /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A7821FB25DD598F00245833 /* SplashViewController.swift */; }; + 1AEDA1F225DC48D500C4EF60 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDA1F125DC48D500C4EF60 /* AppDelegate.swift */; }; + 1AEDA1F425DC48D500C4EF60 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDA1F325DC48D500C4EF60 /* SceneDelegate.swift */; }; + 1AEDA1F925DC48D500C4EF60 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1AEDA1F725DC48D500C4EF60 /* Main.storyboard */; }; + 1AEDA1FB25DC48D600C4EF60 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1AEDA1FA25DC48D600C4EF60 /* Assets.xcassets */; }; + 1AEDA1FE25DC48D600C4EF60 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1AEDA1FC25DC48D600C4EF60 /* LaunchScreen.storyboard */; }; + 363F217020836BB61C8E27EC /* Pods_TracMobility.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 272AB8765F759E60ADB223EA /* Pods_TracMobility.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1A7821BB25DC544900245833 /* AuthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthViewController.swift; sourceTree = ""; }; + 1A7821C625DC58E400245833 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 1A7821CC25DC5C5100245833 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = ""; }; + 1A7821FB25DD598F00245833 /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; }; + 1AEDA1EE25DC48D500C4EF60 /* TracMobility.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TracMobility.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1AEDA1F125DC48D500C4EF60 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 1AEDA1F325DC48D500C4EF60 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 1AEDA1F825DC48D500C4EF60 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 1AEDA1FA25DC48D600C4EF60 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1AEDA1FD25DC48D600C4EF60 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 1AEDA1FF25DC48D600C4EF60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 272AB8765F759E60ADB223EA /* Pods_TracMobility.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TracMobility.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4080F9BDCED395A4F496A9B9 /* Pods-TracMobility.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TracMobility.release.xcconfig"; path = "Target Support Files/Pods-TracMobility/Pods-TracMobility.release.xcconfig"; sourceTree = ""; }; + A67CFB51ABFEA3CE58401FB4 /* Pods-TracMobility.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TracMobility.debug.xcconfig"; path = "Target Support Files/Pods-TracMobility/Pods-TracMobility.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1AEDA1EB25DC48D500C4EF60 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 363F217020836BB61C8E27EC /* Pods_TracMobility.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1A7821BA25DC543300245833 /* Auth */ = { + isa = PBXGroup; + children = ( + 1A7821BB25DC544900245833 /* AuthViewController.swift */, + ); + path = Auth; + sourceTree = ""; + }; + 1A7821CB25DC5C3D00245833 /* Map */ = { + isa = PBXGroup; + children = ( + 1A7821CC25DC5C5100245833 /* MapViewController.swift */, + ); + path = Map; + sourceTree = ""; + }; + 1A7821FA25DD597D00245833 /* Splash */ = { + isa = PBXGroup; + children = ( + 1A7821FB25DD598F00245833 /* SplashViewController.swift */, + ); + path = Splash; + sourceTree = ""; + }; + 1AEDA1E525DC48D400C4EF60 = { + isa = PBXGroup; + children = ( + 1AEDA1F025DC48D500C4EF60 /* TracMobility */, + 1AEDA1EF25DC48D500C4EF60 /* Products */, + A6BA836A8ADB57283B7F8970 /* Pods */, + 91A7ECE33AA839FD3B57CACD /* Frameworks */, + ); + sourceTree = ""; + }; + 1AEDA1EF25DC48D500C4EF60 /* Products */ = { + isa = PBXGroup; + children = ( + 1AEDA1EE25DC48D500C4EF60 /* TracMobility.app */, + ); + name = Products; + sourceTree = ""; + }; + 1AEDA1F025DC48D500C4EF60 /* TracMobility */ = { + isa = PBXGroup; + children = ( + 1A7821FA25DD597D00245833 /* Splash */, + 1A7821BA25DC543300245833 /* Auth */, + 1A7821CB25DC5C3D00245833 /* Map */, + 1AEDA1F125DC48D500C4EF60 /* AppDelegate.swift */, + 1AEDA1F325DC48D500C4EF60 /* SceneDelegate.swift */, + 1AEDA1F725DC48D500C4EF60 /* Main.storyboard */, + 1AEDA1FA25DC48D600C4EF60 /* Assets.xcassets */, + 1AEDA1FC25DC48D600C4EF60 /* LaunchScreen.storyboard */, + 1A7821C625DC58E400245833 /* GoogleService-Info.plist */, + 1AEDA1FF25DC48D600C4EF60 /* Info.plist */, + ); + path = TracMobility; + sourceTree = ""; + }; + 91A7ECE33AA839FD3B57CACD /* Frameworks */ = { + isa = PBXGroup; + children = ( + 272AB8765F759E60ADB223EA /* Pods_TracMobility.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A6BA836A8ADB57283B7F8970 /* Pods */ = { + isa = PBXGroup; + children = ( + A67CFB51ABFEA3CE58401FB4 /* Pods-TracMobility.debug.xcconfig */, + 4080F9BDCED395A4F496A9B9 /* Pods-TracMobility.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1AEDA1ED25DC48D500C4EF60 /* TracMobility */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1AEDA20225DC48D600C4EF60 /* Build configuration list for PBXNativeTarget "TracMobility" */; + buildPhases = ( + 6A0F56C992DDDFDBAF19806D /* [CP] Check Pods Manifest.lock */, + 1AEDA1EA25DC48D500C4EF60 /* Sources */, + 1AEDA1EB25DC48D500C4EF60 /* Frameworks */, + 1AEDA1EC25DC48D500C4EF60 /* Resources */, + 6256E5EA9D4974F209A327E9 /* [CP] Embed Pods Frameworks */, + 5EE71DABB069A23F9AE5F65D /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TracMobility; + productName = TracMobility; + productReference = 1AEDA1EE25DC48D500C4EF60 /* TracMobility.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1AEDA1E625DC48D400C4EF60 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1230; + LastUpgradeCheck = 1230; + TargetAttributes = { + 1AEDA1ED25DC48D500C4EF60 = { + CreatedOnToolsVersion = 12.3; + }; + }; + }; + buildConfigurationList = 1AEDA1E925DC48D400C4EF60 /* Build configuration list for PBXProject "TracMobility" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1AEDA1E525DC48D400C4EF60; + productRefGroup = 1AEDA1EF25DC48D500C4EF60 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1AEDA1ED25DC48D500C4EF60 /* TracMobility */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1AEDA1EC25DC48D500C4EF60 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AEDA1FE25DC48D600C4EF60 /* LaunchScreen.storyboard in Resources */, + 1A7821C725DC58E400245833 /* GoogleService-Info.plist in Resources */, + 1AEDA1FB25DC48D600C4EF60 /* Assets.xcassets in Resources */, + 1AEDA1F925DC48D500C4EF60 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 5EE71DABB069A23F9AE5F65D /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TracMobility/Pods-TracMobility-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TracMobility/Pods-TracMobility-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TracMobility/Pods-TracMobility-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 6256E5EA9D4974F209A327E9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TracMobility/Pods-TracMobility-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TracMobility/Pods-TracMobility-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TracMobility/Pods-TracMobility-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 6A0F56C992DDDFDBAF19806D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TracMobility-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1AEDA1EA25DC48D500C4EF60 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A7821BC25DC544900245833 /* AuthViewController.swift in Sources */, + 1AEDA1F225DC48D500C4EF60 /* AppDelegate.swift in Sources */, + 1A7821FC25DD598F00245833 /* SplashViewController.swift in Sources */, + 1A7821CD25DC5C5100245833 /* MapViewController.swift in Sources */, + 1AEDA1F425DC48D500C4EF60 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1AEDA1F725DC48D500C4EF60 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1AEDA1F825DC48D500C4EF60 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 1AEDA1FC25DC48D600C4EF60 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1AEDA1FD25DC48D600C4EF60 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1AEDA20025DC48D600C4EF60 /* 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 = 13.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; + }; + 1AEDA20125DC48D600C4EF60 /* 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 = 13.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; + }; + 1AEDA20325DC48D600C4EF60 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A67CFB51ABFEA3CE58401FB4 /* Pods-TracMobility.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 26GZ63PU38; + INFOPLIST_FILE = TracMobility/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = saniazafar.TracMobility; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 1AEDA20425DC48D600C4EF60 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4080F9BDCED395A4F496A9B9 /* Pods-TracMobility.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 26GZ63PU38; + INFOPLIST_FILE = TracMobility/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = saniazafar.TracMobility; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1AEDA1E925DC48D400C4EF60 /* Build configuration list for PBXProject "TracMobility" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1AEDA20025DC48D600C4EF60 /* Debug */, + 1AEDA20125DC48D600C4EF60 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1AEDA20225DC48D600C4EF60 /* Build configuration list for PBXNativeTarget "TracMobility" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1AEDA20325DC48D600C4EF60 /* Debug */, + 1AEDA20425DC48D600C4EF60 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1AEDA1E625DC48D400C4EF60 /* Project object */; +} diff --git a/TracMobility.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TracMobility.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TracMobility.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TracMobility.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TracMobility.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TracMobility.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TracMobility.xcworkspace/contents.xcworkspacedata b/TracMobility.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..007dbb8 --- /dev/null +++ b/TracMobility.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/TracMobility.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TracMobility.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TracMobility.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TracMobility/AppDelegate.swift b/TracMobility/AppDelegate.swift new file mode 100644 index 0000000..304ce95 --- /dev/null +++ b/TracMobility/AppDelegate.swift @@ -0,0 +1,40 @@ +// +// AppDelegate.swift +// TracMobility +// +// Created by sania zafar on 16/02/2021. +// + +import UIKit +import GoogleSignIn +import GoogleMaps + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + GIDSignIn.sharedInstance().clientID = "794354601493-r1a1l9plivj613gqrca0g62aohdsg67s.apps.googleusercontent.com" + GMSServices.provideAPIKey("AIzaSyCfuOzONBl21S8Uxv7wQwOVMjOKDdTIk_Y") + + 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/TracMobility/Assets.xcassets/AccentColor.colorset/Contents.json b/TracMobility/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/TracMobility/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/AppIcon.appiconset/Contents.json b/TracMobility/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/TracMobility/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/TracMobility/Assets.xcassets/Contents.json b/TracMobility/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/TracMobility/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/facebook-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/facebook-icon.imageset/Contents.json new file mode 100644 index 0000000..16de9b1 --- /dev/null +++ b/TracMobility/Assets.xcassets/facebook-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "facebook-icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/facebook-icon.imageset/facebook-icon@3x.png b/TracMobility/Assets.xcassets/facebook-icon.imageset/facebook-icon@3x.png new file mode 100644 index 0000000..4feab54 Binary files /dev/null and b/TracMobility/Assets.xcassets/facebook-icon.imageset/facebook-icon@3x.png differ diff --git a/TracMobility/Assets.xcassets/free-ride.imageset/Contents.json b/TracMobility/Assets.xcassets/free-ride.imageset/Contents.json new file mode 100644 index 0000000..4f93dac --- /dev/null +++ b/TracMobility/Assets.xcassets/free-ride.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "free-ride@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/free-ride.imageset/free-ride@3x.png b/TracMobility/Assets.xcassets/free-ride.imageset/free-ride@3x.png new file mode 100644 index 0000000..55c147e Binary files /dev/null and b/TracMobility/Assets.xcassets/free-ride.imageset/free-ride@3x.png differ diff --git a/TracMobility/Assets.xcassets/google-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/google-icon.imageset/Contents.json new file mode 100644 index 0000000..73e32d8 --- /dev/null +++ b/TracMobility/Assets.xcassets/google-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "google-icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/google-icon.imageset/google-icon@3x.png b/TracMobility/Assets.xcassets/google-icon.imageset/google-icon@3x.png new file mode 100644 index 0000000..ddaf2e2 Binary files /dev/null and b/TracMobility/Assets.xcassets/google-icon.imageset/google-icon@3x.png differ diff --git a/TracMobility/Assets.xcassets/inbox-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/inbox-icon.imageset/Contents.json new file mode 100644 index 0000000..017493f --- /dev/null +++ b/TracMobility/Assets.xcassets/inbox-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "inbox-icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/inbox-icon.imageset/inbox-icon@3x.png b/TracMobility/Assets.xcassets/inbox-icon.imageset/inbox-icon@3x.png new file mode 100644 index 0000000..bcdad44 Binary files /dev/null and b/TracMobility/Assets.xcassets/inbox-icon.imageset/inbox-icon@3x.png differ diff --git a/TracMobility/Assets.xcassets/map-marker.imageset/Contents.json b/TracMobility/Assets.xcassets/map-marker.imageset/Contents.json new file mode 100644 index 0000000..0562b74 --- /dev/null +++ b/TracMobility/Assets.xcassets/map-marker.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "map-marker@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/map-marker.imageset/map-marker@3x.png b/TracMobility/Assets.xcassets/map-marker.imageset/map-marker@3x.png new file mode 100644 index 0000000..cf8bfb1 Binary files /dev/null and b/TracMobility/Assets.xcassets/map-marker.imageset/map-marker@3x.png differ diff --git a/TracMobility/Assets.xcassets/membership.imageset/Contents.json b/TracMobility/Assets.xcassets/membership.imageset/Contents.json new file mode 100644 index 0000000..dd5e833 --- /dev/null +++ b/TracMobility/Assets.xcassets/membership.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "membership@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/membership.imageset/membership@3x.png b/TracMobility/Assets.xcassets/membership.imageset/membership@3x.png new file mode 100644 index 0000000..0007770 Binary files /dev/null and b/TracMobility/Assets.xcassets/membership.imageset/membership@3x.png differ diff --git a/TracMobility/Assets.xcassets/menu-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/menu-icon.imageset/Contents.json new file mode 100644 index 0000000..1753fd9 --- /dev/null +++ b/TracMobility/Assets.xcassets/menu-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "menu-icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/menu-icon.imageset/menu-icon@3x.png b/TracMobility/Assets.xcassets/menu-icon.imageset/menu-icon@3x.png new file mode 100644 index 0000000..782cf01 Binary files /dev/null and b/TracMobility/Assets.xcassets/menu-icon.imageset/menu-icon@3x.png differ diff --git a/TracMobility/Assets.xcassets/profile-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/profile-icon.imageset/Contents.json new file mode 100644 index 0000000..8db2be7 --- /dev/null +++ b/TracMobility/Assets.xcassets/profile-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "profile-icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/profile-icon.imageset/profile-icon@3x.png b/TracMobility/Assets.xcassets/profile-icon.imageset/profile-icon@3x.png new file mode 100644 index 0000000..fef56c4 Binary files /dev/null and b/TracMobility/Assets.xcassets/profile-icon.imageset/profile-icon@3x.png differ diff --git a/TracMobility/Assets.xcassets/promos.imageset/Contents.json b/TracMobility/Assets.xcassets/promos.imageset/Contents.json new file mode 100644 index 0000000..1a2a5f0 --- /dev/null +++ b/TracMobility/Assets.xcassets/promos.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "promos@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/promos.imageset/promos@3x.png b/TracMobility/Assets.xcassets/promos.imageset/promos@3x.png new file mode 100644 index 0000000..151cfa9 Binary files /dev/null and b/TracMobility/Assets.xcassets/promos.imageset/promos@3x.png differ diff --git a/TracMobility/Assets.xcassets/settings.imageset/Contents.json b/TracMobility/Assets.xcassets/settings.imageset/Contents.json new file mode 100644 index 0000000..89a160d --- /dev/null +++ b/TracMobility/Assets.xcassets/settings.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "settings@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/settings.imageset/settings@3x.png b/TracMobility/Assets.xcassets/settings.imageset/settings@3x.png new file mode 100644 index 0000000..0384e2f Binary files /dev/null and b/TracMobility/Assets.xcassets/settings.imageset/settings@3x.png differ diff --git a/TracMobility/Assets.xcassets/trac-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/trac-icon.imageset/Contents.json new file mode 100644 index 0000000..3a75a66 --- /dev/null +++ b/TracMobility/Assets.xcassets/trac-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "trac-mobility-logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/trac-icon.imageset/trac-mobility-logo@3x.png b/TracMobility/Assets.xcassets/trac-icon.imageset/trac-mobility-logo@3x.png new file mode 100644 index 0000000..c3d44e0 Binary files /dev/null and b/TracMobility/Assets.xcassets/trac-icon.imageset/trac-mobility-logo@3x.png differ diff --git a/TracMobility/Assets.xcassets/trac-mobility-icon.imageset/Contents.json b/TracMobility/Assets.xcassets/trac-mobility-icon.imageset/Contents.json new file mode 100644 index 0000000..3a75a66 --- /dev/null +++ b/TracMobility/Assets.xcassets/trac-mobility-icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "trac-mobility-logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/trac-mobility-icon.imageset/trac-mobility-logo@3x.png b/TracMobility/Assets.xcassets/trac-mobility-icon.imageset/trac-mobility-logo@3x.png new file mode 100644 index 0000000..c43197a Binary files /dev/null and b/TracMobility/Assets.xcassets/trac-mobility-icon.imageset/trac-mobility-logo@3x.png differ diff --git a/TracMobility/Assets.xcassets/wallet.imageset/Contents.json b/TracMobility/Assets.xcassets/wallet.imageset/Contents.json new file mode 100644 index 0000000..335f3a2 --- /dev/null +++ b/TracMobility/Assets.xcassets/wallet.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "wallet@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/wallet.imageset/wallet@3x.png b/TracMobility/Assets.xcassets/wallet.imageset/wallet@3x.png new file mode 100644 index 0000000..4a8569a Binary files /dev/null and b/TracMobility/Assets.xcassets/wallet.imageset/wallet@3x.png differ diff --git a/TracMobility/Assets.xcassets/your-ride.imageset/Contents.json b/TracMobility/Assets.xcassets/your-ride.imageset/Contents.json new file mode 100644 index 0000000..d10f0ba --- /dev/null +++ b/TracMobility/Assets.xcassets/your-ride.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "you-ride@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TracMobility/Assets.xcassets/your-ride.imageset/you-ride@3x.png b/TracMobility/Assets.xcassets/your-ride.imageset/you-ride@3x.png new file mode 100644 index 0000000..9313776 Binary files /dev/null and b/TracMobility/Assets.xcassets/your-ride.imageset/you-ride@3x.png differ diff --git a/TracMobility/Auth/AuthViewController.swift b/TracMobility/Auth/AuthViewController.swift new file mode 100644 index 0000000..d45b49c --- /dev/null +++ b/TracMobility/Auth/AuthViewController.swift @@ -0,0 +1,113 @@ +// +// AuthViewController.swift +// TracMobility +// +// Created by Sania Zafar on 16/02/2021. +// + +import UIKit +import GoogleSignIn + +class AuthViewController: UIViewController { + + @IBOutlet weak var firstNameTextField: UITextField! + @IBOutlet weak var lastNameTextField: UITextField! + @IBOutlet weak var emailTextField: UITextField! + static let GoogleSignInCancelCode = -5 + + + // MARK: - View LifeCycle methods + + override func viewDidLoad() { + super.viewDidLoad() + self.configureUI() + } + + + // MARK: - IBActions + + @IBAction func tappedSignup(_ sender: Any) { + self.isValidUserInfo() ? self.navigateToMaps() : self.showAlert(with: "Please Enter all Fields") + } + + @IBAction func tappedGoogleLogin(_ sender: Any) { + GIDSignIn.sharedInstance()?.delegate = self + GIDSignIn.sharedInstance()?.presentingViewController = self + GIDSignIn.sharedInstance()?.shouldFetchBasicProfile = true + GIDSignIn.sharedInstance()?.signIn() + } + + @IBAction func tappedFacebookLogin(_ sender: Any) { + //TODO + self.showAlert(with: "We're sorry! Stay with us while we develop this feature") + } + +} + + +// MARK: - Private + +private extension AuthViewController { + + func configureUI() { + firstNameTextField.delegate = self + lastNameTextField.delegate = self + emailTextField.delegate = self + } + + func navigateToMaps() { + let storyboard = UIStoryboard(name: "Main", bundle: nil) + if let mapViewController = storyboard.instantiateViewController(withIdentifier: "MapViewController") as? MapViewController { + mapViewController.modalPresentationStyle = .fullScreen + self.present(mapViewController, animated: true, completion: nil) + } + } + + ///This method only checks for empty text fields, we can also add validation for Name and Email later + func isValidUserInfo() -> Bool { + + return !(self.firstNameTextField.text?.isEmpty ?? true) && + !(self.lastNameTextField.text?.isEmpty ?? true) && + !(self.emailTextField.text?.isEmpty ?? true) + } + + func showAlert(with message: String) { + let alertController = UIAlertController(title: "Trac Mobility", message: message, preferredStyle: .alert) + let alertAction = UIAlertAction(title: "OK", style: .default, handler: nil) + alertController.addAction(alertAction) + self.present(alertController, animated: true, completion: nil) + } + +} + + +// MARK: - UITextFieldDelegate + +extension AuthViewController: UITextFieldDelegate { + + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + textField.resignFirstResponder() + + return true + } + +} + + +// MARK: - GIDSignInDelegate Methods + +extension AuthViewController: GIDSignInDelegate { + + func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) { + if let googleError = error as NSError?, googleError.code != AuthViewController.GoogleSignInCancelCode { + + } else if let googleError = error as NSError?, + googleError.code == AuthViewController.GoogleSignInCancelCode { + + return + } else if user != nil, let _ = user.authentication { + self.navigateToMaps() + } + } + +} diff --git a/TracMobility/Base.lproj/LaunchScreen.storyboard b/TracMobility/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/TracMobility/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TracMobility/Base.lproj/Main.storyboard b/TracMobility/Base.lproj/Main.storyboard new file mode 100644 index 0000000..206b689 --- /dev/null +++ b/TracMobility/Base.lproj/Main.storyboard @@ -0,0 +1,523 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TracMobility/GoogleService-Info.plist b/TracMobility/GoogleService-Info.plist new file mode 100644 index 0000000..c507e8e --- /dev/null +++ b/TracMobility/GoogleService-Info.plist @@ -0,0 +1,14 @@ + + + + + CLIENT_ID + 794354601493-r1a1l9plivj613gqrca0g62aohdsg67s.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.794354601493-r1a1l9plivj613gqrca0g62aohdsg67s + PLIST_VERSION + 1 + BUNDLE_ID + saniazafar.TracMobility + + diff --git a/TracMobility/Info.plist b/TracMobility/Info.plist new file mode 100644 index 0000000..9f5121a --- /dev/null +++ b/TracMobility/Info.plist @@ -0,0 +1,88 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + com.googleusercontent.apps.794354601493-r1a1l9plivj613gqrca0g62aohdsg67s + + + + CFBundleVersion + 1 + LSApplicationQueriesSchemes + + googlechromes + comgooglemaps + + LSRequiresIPhoneOS + + NSLocationWhenInUseUsageDescription + Without this permission, the Trac App cannot help detect your address + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UIBackgroundModes + + fetch + location + processing + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TracMobility/Map/MapViewController.swift b/TracMobility/Map/MapViewController.swift new file mode 100644 index 0000000..7b87db9 --- /dev/null +++ b/TracMobility/Map/MapViewController.swift @@ -0,0 +1,167 @@ +// +// MapViewController.swift +// TracMobility +// +// Created by sania zafar on 17/02/2021. +// + +import UIKit +import GoogleMaps + +class MapViewController: UIViewController { + + @IBOutlet weak var mapView: GMSMapView! + @IBOutlet weak var markerVerticalConstraint: NSLayoutConstraint! + @IBOutlet weak var menuView: UIView! + let locationManager = CLLocationManager() + var location = CLLocationCoordinate2D() + + + // MARK: - View LifeCycle methods + + override func viewDidLoad() { + super.viewDidLoad() + self.setupMapServices() + self.configLocationServices() + self.menuView.isHidden = true + } + + + // MARK: - Private + + private func reverseGeocode(coordinate: CLLocationCoordinate2D) { + let geocoder = GMSGeocoder() + geocoder.reverseGeocodeCoordinate(coordinate) { [weak self] (response, error) in + self?.location = coordinate + UIView.animate(withDuration: 0.25) { + self?.markerVerticalConstraint.constant = -30 + self?.view.layoutIfNeeded() + } + } + } + + private func setupMapServices() { + locationManager.delegate = self + mapView.delegate = self + locationManager.requestLocation() + mapView.isMyLocationEnabled = true + } + + func configLocationServices() { + locationManager.delegate = self + let status = CLLocationManager.authorizationStatus() + if status == .notDetermined { + locationManager.requestWhenInUseAuthorization() + } else if status == .denied || status == .restricted { + self.showLocationSetUpAlert(false) + } else { + if #available(iOS 14.0, *) { + if locationManager.accuracyAuthorization == .reducedAccuracy { + self.showLocationSetUpAlert(true) + } else { + self.updateLocationManagerAttributes() + } + } else { + self.updateLocationManagerAttributes() + } + } + } + + func showLocationSetUpAlert(_ forIos14Later: Bool) { + let alert = UIAlertController(title: forIos14Later ? "Location Services Disabled" : "Precise Location Disabled", message: "Let us find your location by allowing us access from your phone settings", preferredStyle: .alert) + let okAction = UIAlertAction(title: "Settings", style: .default) { (okAction) in + if let url = URL(string: UIApplication.openSettingsURLString) { + UIApplication.shared.open(url, options: [:], completionHandler: nil) + } + } + let cancelAction = UIAlertAction(title: "Cancel", style: .default) { (cancelAction) in + self.dismiss(animated: true, completion: nil) + } + alert.addAction(okAction) + alert.addAction(cancelAction) + present(alert, animated: true, completion: nil) + } + + func updateLocationManagerAttributes() { + self.locationManager.desiredAccuracy = kCLLocationAccuracyKilometer + self.locationManager.distanceFilter = 500 + self.locationManager.startUpdatingLocation() + } + + + // MARK: - IBAction + + @IBAction func openCloseMenu(_ sender: UIButton) { + ///can add animations to show/hide menu view + self.menuView.isHidden = sender.tag == 1 + } + +} + + +// MARK: - CLLocationManagerDelegate + +extension MapViewController: CLLocationManagerDelegate { + + + // MARK: - CLLocationManager Delegate + + func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { + let userLocation = locations.last + let camera = GMSCameraPosition.camera(withLatitude: userLocation!.coordinate.latitude, + longitude: userLocation!.coordinate.longitude, zoom: 16.0) + if self.location.latitude != 0 , self.location.longitude != 0 { + mapView.animate(to: GMSCameraPosition.camera(withLatitude: self.location.latitude, + longitude: self.location.longitude, zoom: 16.0)) + } else { + mapView.animate(to: camera) + } + locationManager.stopUpdatingLocation() + } + + func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { + if status == .authorizedWhenInUse || status == .authorizedAlways { + self.updateLocationManagerAttributes() + } else { + self.showLocationSetUpAlert(false) + } + } + + func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { + print(error) + } + + @available(iOS 14.0, *) + func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) { + print(CLLocationManager.authorizationStatus()) + switch CLLocationManager.authorizationStatus() { + case .authorizedWhenInUse, .authorizedAlways: + if locationManager.accuracyAuthorization == .reducedAccuracy { + self.showLocationSetUpAlert(true) + } else { + self.updateLocationManagerAttributes() + } + default: + self.showLocationSetUpAlert(true) + } + switch manager.accuracyAuthorization { + case .fullAccuracy: + self.updateLocationManagerAttributes() + default: + self.showLocationSetUpAlert(true) + } + } + +} + + +// MARK: - GMSMapViewDelegate + +extension MapViewController: GMSMapViewDelegate { + + func mapView(_ mapView: GMSMapView, idleAt position: GMSCameraPosition) { + reverseGeocode(coordinate: position.target) + + } + +} diff --git a/TracMobility/SceneDelegate.swift b/TracMobility/SceneDelegate.swift new file mode 100644 index 0000000..371e42c --- /dev/null +++ b/TracMobility/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// TracMobility +// +// Created by sania zafar on 16/02/2021. +// + +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/TracMobility/Splash/SplashViewController.swift b/TracMobility/Splash/SplashViewController.swift new file mode 100644 index 0000000..caa7327 --- /dev/null +++ b/TracMobility/Splash/SplashViewController.swift @@ -0,0 +1,40 @@ +// +// SplashViewController.swift +// TracMobility +// +// Created by sania zafar on 17/02/2021. +// + +import UIKit + +class SplashViewController: UIViewController { + + @IBOutlet weak var logoImageView: UIImageView! + + + // MARK: - View LifeCycle methods + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + UIView.animate(withDuration: 1.0, delay: 0.0, options: .curveEaseInOut) { [weak self] in + self?.logoImageView.transform = CGAffineTransform(scaleX: 1.2, y: 1.2) + } completion: { [weak self] (completed) in + UIView.animate(withDuration: 1.0) { + self?.logoImageView.transform = .identity + self?.perform(#selector(self?.navigateToAuthScreen), with: nil, afterDelay: 1.0) + } + } + } + + + // MARK: - Private + + @objc private func navigateToAuthScreen() { + let storyboard = UIStoryboard(name: "Main", bundle: nil) + if let authViewController = storyboard.instantiateViewController(withIdentifier: "AuthViewController") as? AuthViewController { + authViewController.modalPresentationStyle = .fullScreen + self.present(authViewController, animated: true, completion: nil) + } + } + +}