diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Mine/MineViewController.swift b/Meterage/ViewControllers/Mine/MineViewController.swift new file mode 100644 index 0000000..14384b0 --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.swift @@ -0,0 +1,29 @@ +// +// MineViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class MineViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Mine/MineViewController.swift b/Meterage/ViewControllers/Mine/MineViewController.swift new file mode 100644 index 0000000..14384b0 --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.swift @@ -0,0 +1,29 @@ +// +// MineViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class MineViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Mine/MineViewController.xib b/Meterage/ViewControllers/Mine/MineViewController.xib new file mode 100644 index 0000000..914cebe --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Mine/MineViewController.swift b/Meterage/ViewControllers/Mine/MineViewController.swift new file mode 100644 index 0000000..14384b0 --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.swift @@ -0,0 +1,29 @@ +// +// MineViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class MineViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Mine/MineViewController.xib b/Meterage/ViewControllers/Mine/MineViewController.xib new file mode 100644 index 0000000..914cebe --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Sample/SamplePageViewController.swift b/Meterage/ViewControllers/Sample/SamplePageViewController.swift new file mode 100644 index 0000000..cd92e4f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.swift @@ -0,0 +1,29 @@ +// +// SamplePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class SamplePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Mine/MineViewController.swift b/Meterage/ViewControllers/Mine/MineViewController.swift new file mode 100644 index 0000000..14384b0 --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.swift @@ -0,0 +1,29 @@ +// +// MineViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class MineViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Mine/MineViewController.xib b/Meterage/ViewControllers/Mine/MineViewController.xib new file mode 100644 index 0000000..914cebe --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Sample/SamplePageViewController.swift b/Meterage/ViewControllers/Sample/SamplePageViewController.swift new file mode 100644 index 0000000..cd92e4f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.swift @@ -0,0 +1,29 @@ +// +// SamplePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class SamplePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Sample/SamplePageViewController.xib b/Meterage/ViewControllers/Sample/SamplePageViewController.xib new file mode 100644 index 0000000..e09dc7f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Mine/MineViewController.swift b/Meterage/ViewControllers/Mine/MineViewController.swift new file mode 100644 index 0000000..14384b0 --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.swift @@ -0,0 +1,29 @@ +// +// MineViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class MineViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Mine/MineViewController.xib b/Meterage/ViewControllers/Mine/MineViewController.xib new file mode 100644 index 0000000..914cebe --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Sample/SamplePageViewController.swift b/Meterage/ViewControllers/Sample/SamplePageViewController.swift new file mode 100644 index 0000000..cd92e4f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.swift @@ -0,0 +1,29 @@ +// +// SamplePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class SamplePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Sample/SamplePageViewController.xib b/Meterage/ViewControllers/Sample/SamplePageViewController.xib new file mode 100644 index 0000000..e09dc7f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..37e55de --- /dev/null +++ b/Podfile @@ -0,0 +1,38 @@ +# Uncomment the next line to define a global platform for your project +platform :ios, '12.0' + +target 'Meterage' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for Meterage + + # 网络请求框架 + pod 'Alamofire', '~> 4.7' + # RSA加密 + pod 'SwiftyRSA' + # JSON解析 + pod 'SwiftyJSON' + # 加载控件 + pod 'MBProgressHUD' + # Kingfisher 是一个下载、缓存网络图片的轻量级纯swift库 + pod 'Kingfisher' + # 自动约束布局 + pod 'SnapKit' + # Model转JSON + pod 'HandyJSON' + # Toast提示 + pod 'Toast-Swift' + # 本地对象存储,类似sp + pod 'DefaultsKit' + # 16进制颜色转换 + pod 'Hue' + # 图片选择器 + pod 'HXPHPicker' + # 大图查看 + pod 'ZLPhotoBrowser' + # 刷新控件 + pod 'MJRefresh' + # 键盘遮挡解决方案 + pod 'IQKeyboardManagerSwift', '~> 6.5.0' +end diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0a60bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/Pods/ +/.idea/ \ No newline at end of file diff --git a/Meterage.xcodeproj/project.pbxproj b/Meterage.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92e7143 --- /dev/null +++ b/Meterage.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */; }; + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */; }; + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BF9E434C439573438A46 /* Dictionary.swift */; }; + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */; }; + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */; }; + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */; }; + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */; }; + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */; }; + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */; }; + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA696298A634D00B8FF09 /* MineViewController.swift */; }; + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA697298A634D00B8FF09 /* MineViewController.xib */; }; + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */; }; + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */; }; + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */; }; + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */; }; + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */; }; + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */; }; + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AB298B613400B8FF09 /* Constant.swift */; }; + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AD298B614100B8FF09 /* AlertHub.swift */; }; + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */; }; + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */; }; + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */; }; + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AEA6B5298B655E00B8FF09 /* String.swift */; }; + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpRequestCreator.swift; sourceTree = ""; }; + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meterage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2CD9BF9E434C439573438A46 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = ""; }; + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageViewController.swift; sourceTree = ""; }; + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomePageViewController.xib; sourceTree = ""; }; + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplePageViewController.swift; sourceTree = ""; }; + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SamplePageViewController.xib; sourceTree = ""; }; + 65AEA696298A634D00B8FF09 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + 65AEA697298A634D00B8FF09 /* MineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = ""; }; + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = ""; }; + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemModel.swift; sourceTree = ""; }; + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideViewController.swift; sourceTree = ""; }; + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuideViewController.xib; sourceTree = ""; }; + 65AEA6AB298B613400B8FF09 /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertHub.swift; sourceTree = ""; }; + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingHub.swift; sourceTree = ""; }; + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseConfigModel.swift; sourceTree = ""; }; + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResultModel.swift; sourceTree = ""; }; + 65AEA6B5298B655E00B8FF09 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.debug.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.debug.xcconfig"; sourceTree = ""; }; + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meterage.release.xcconfig"; path = "Target Support Files/Pods-Meterage/Pods-Meterage.release.xcconfig"; sourceTree = ""; }; + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Meterage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 709532624A2602F10DBAE7B8 /* Pods_Meterage.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 031197A79E70913A6A43CB52 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D57EFAA58CD68AF05AD79419 /* Pods_Meterage.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2CD9B1CC93AE1C37A5C22768 /* Products */ = { + isa = PBXGroup; + children = ( + 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */, + ); + name = Products; + sourceTree = ""; + }; + 2CD9B3CCE520A689E073AA57 /* Meterage */ = { + isa = PBXGroup; + children = ( + 65AEA6AA298B603700B8FF09 /* Utils */, + 65AEA6A2298A651900B8FF09 /* Model */, + 65AEA69F298A64DF00B8FF09 /* Extensions */, + 65AEA68A298A62FC00B8FF09 /* ViewControllers */, + 2CD9BF0F698CD6765DFD72B7 /* Assets.xcassets */, + 2CD9BE79AFCDD9AB8BD068B7 /* AppDelegate.swift */, + 2CD9B0D8EC74EE60E359AC0C /* Info.plist */, + 65AEA683298A5F9500B8FF09 /* AppCoordinator.swift */, + ); + path = Meterage; + sourceTree = ""; + }; + 2CD9B4DBC563EE22FD5CAD6C = { + isa = PBXGroup; + children = ( + 2CD9B1CC93AE1C37A5C22768 /* Products */, + 2CD9B3CCE520A689E073AA57 /* Meterage */, + 31E991A7971A549C24E2D157 /* Pods */, + 031197A79E70913A6A43CB52 /* Frameworks */, + ); + sourceTree = ""; + }; + 31E991A7971A549C24E2D157 /* Pods */ = { + isa = PBXGroup; + children = ( + 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */, + 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 65AEA68A298A62FC00B8FF09 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 65AEA6A5298A69C500B8FF09 /* Guide */, + 65AEA69A298A648800B8FF09 /* Login */, + 65AEA68D298A631700B8FF09 /* Mine */, + 65AEA68C298A630E00B8FF09 /* Sample */, + 65AEA68B298A630200B8FF09 /* Home */, + ); + path = ViewControllers; + sourceTree = ""; + }; + 65AEA68B298A630200B8FF09 /* Home */ = { + isa = PBXGroup; + children = ( + 65AEA68E298A632B00B8FF09 /* HomePageViewController.swift */, + 65AEA68F298A632B00B8FF09 /* HomePageViewController.xib */, + ); + path = Home; + sourceTree = ""; + }; + 65AEA68C298A630E00B8FF09 /* Sample */ = { + isa = PBXGroup; + children = ( + 65AEA692298A633E00B8FF09 /* SamplePageViewController.swift */, + 65AEA693298A633E00B8FF09 /* SamplePageViewController.xib */, + ); + path = Sample; + sourceTree = ""; + }; + 65AEA68D298A631700B8FF09 /* Mine */ = { + isa = PBXGroup; + children = ( + 65AEA696298A634D00B8FF09 /* MineViewController.swift */, + 65AEA697298A634D00B8FF09 /* MineViewController.xib */, + ); + path = Mine; + sourceTree = ""; + }; + 65AEA69A298A648800B8FF09 /* Login */ = { + isa = PBXGroup; + children = ( + 65AEA69B298A649F00B8FF09 /* LoginViewController.swift */, + 65AEA69C298A649F00B8FF09 /* LoginViewController.xib */, + ); + path = Login; + sourceTree = ""; + }; + 65AEA69F298A64DF00B8FF09 /* Extensions */ = { + isa = PBXGroup; + children = ( + 65AEA6A0298A64EE00B8FF09 /* UIColor.swift */, + 65AEA6B5298B655E00B8FF09 /* String.swift */, + 2CD9BF9E434C439573438A46 /* Dictionary.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 65AEA6A2298A651900B8FF09 /* Model */ = { + isa = PBXGroup; + children = ( + 65AEA6A3298A652700B8FF09 /* MenuItemModel.swift */, + 65AEA6B1298B642400B8FF09 /* BaseConfigModel.swift */, + 65AEA6B3298B64DC00B8FF09 /* LoginResultModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 65AEA6A5298A69C500B8FF09 /* Guide */ = { + isa = PBXGroup; + children = ( + 65AEA6A6298A69D500B8FF09 /* GuideViewController.swift */, + 65AEA6A7298A69D500B8FF09 /* GuideViewController.xib */, + ); + path = Guide; + sourceTree = ""; + }; + 65AEA6AA298B603700B8FF09 /* Utils */ = { + isa = PBXGroup; + children = ( + 65AEA6AB298B613400B8FF09 /* Constant.swift */, + 65AEA6AD298B614100B8FF09 /* AlertHub.swift */, + 65AEA6AF298B62D900B8FF09 /* LoadingHub.swift */, + 2CD9B6CEF9BEA88482C5ADB8 /* HttpRequestCreator.swift */, + ); + path = Utils; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2CD9B24ABCD4A59C67F92D3E /* Meterage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */; + buildPhases = ( + B61B375680E71D44F8A4837D /* [CP] Check Pods Manifest.lock */, + 2CD9B9DE10106352DE0CBD94 /* Sources */, + 2CD9BABCF578FD09EB2A9B20 /* Frameworks */, + 2CD9B499EF921D0A170D27A4 /* Resources */, + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Meterage; + productName = Meterage; + productReference = 2CD9BDA6FDEF0C30BAF8DDF3 /* Meterage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2CD9B6C884B8EE9D740C041F /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 2CD9B4DBC563EE22FD5CAD6C; + productRefGroup = 2CD9B1CC93AE1C37A5C22768 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2CD9B24ABCD4A59C67F92D3E /* Meterage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2CD9B499EF921D0A170D27A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA695298A633E00B8FF09 /* SamplePageViewController.xib in Resources */, + 65AEA6A9298A69D500B8FF09 /* GuideViewController.xib in Resources */, + 65AEA691298A632B00B8FF09 /* HomePageViewController.xib in Resources */, + 2CD9B5D17F91A33743878C1A /* Assets.xcassets in Resources */, + 65AEA69E298A649F00B8FF09 /* LoginViewController.xib in Resources */, + 65AEA699298A634D00B8FF09 /* MineViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B61B375680E71D44F8A4837D /* [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-Meterage-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; + }; + F25AFE26AB14EE0C4F038C0A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/DefaultsKit/DefaultsKit.framework", + "${BUILT_PRODUCTS_DIR}/HXPHPicker/HXPHPicker.framework", + "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework", + "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", + "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", + "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyRSA/SwiftyRSA.framework", + "${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework", + "${BUILT_PRODUCTS_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DefaultsKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HXPHPicker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyRSA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZLPhotoBrowser.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Meterage/Pods-Meterage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CD9B9DE10106352DE0CBD94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 65AEA6AE298B614100B8FF09 /* AlertHub.swift in Sources */, + 65AEA69D298A649F00B8FF09 /* LoginViewController.swift in Sources */, + 65AEA6A1298A64EE00B8FF09 /* UIColor.swift in Sources */, + 65AEA6B2298B642400B8FF09 /* BaseConfigModel.swift in Sources */, + 65AEA6A8298A69D500B8FF09 /* GuideViewController.swift in Sources */, + 65AEA684298A5F9500B8FF09 /* AppCoordinator.swift in Sources */, + 65AEA6B4298B64DC00B8FF09 /* LoginResultModel.swift in Sources */, + 65AEA6A4298A652700B8FF09 /* MenuItemModel.swift in Sources */, + 2CD9B9317E39E14700E7C9C2 /* AppDelegate.swift in Sources */, + 65AEA690298A632B00B8FF09 /* HomePageViewController.swift in Sources */, + 65AEA6B0298B62D900B8FF09 /* LoadingHub.swift in Sources */, + 65AEA6AC298B613400B8FF09 /* Constant.swift in Sources */, + 65AEA6B6298B655E00B8FF09 /* String.swift in Sources */, + 65AEA694298A633E00B8FF09 /* SamplePageViewController.swift in Sources */, + 65AEA698298A634D00B8FF09 /* MineViewController.swift in Sources */, + 2CD9B8A8FED825F0E1B79C36 /* Dictionary.swift in Sources */, + 2CD9B472817F36562709487F /* HttpRequestCreator.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2CD9B08696F80046DB88A2AD /* 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++20"; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2CD9B63AD5ECAC9C0B3483D7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CBB43485F5EC2EA4CB19DE8 /* Pods-Meterage.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2CD9B67B951B21E98DDE9AB6 /* 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++20"; + 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 = 12.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; + }; + 2CD9BA7751AA78A59233D228 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 669B71ABD27BC5FCF49723E9 /* Pods-Meterage.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Meterage/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.casic.xz.Meterage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2CD9BA254BB824603CA08828 /* Build configuration list for PBXProject "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9B67B951B21E98DDE9AB6 /* Debug */, + 2CD9B08696F80046DB88A2AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2CD9BE3057D548F27FEA8658 /* Build configuration list for PBXNativeTarget "Meterage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2CD9BA7751AA78A59233D228 /* Debug */, + 2CD9B63AD5ECAC9C0B3483D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2CD9B6C884B8EE9D740C041F /* Project object */; +} diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme new file mode 100644 index 0000000..5fb2dba --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/Meterage.xcscheme @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6d9ad3e --- /dev/null +++ b/Meterage.xcodeproj/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Meterage.xcscheme + + orderHint + 0 + + + + diff --git a/Meterage.xcworkspace/contents.xcworkspacedata b/Meterage.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..58d4dfd --- /dev/null +++ b/Meterage.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Meterage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..84e7dde --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..69223e6 --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Meterage.xcworkspace/xcuserdata/a203.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Meterage/AppCoordinator.swift b/Meterage/AppCoordinator.swift new file mode 100644 index 0000000..98574e6 --- /dev/null +++ b/Meterage/AppCoordinator.swift @@ -0,0 +1,90 @@ +// +// AppCoordinator.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum TabBarSelectedType { + case home + case sample + case mine +} + +class AppCoordinator { + static let shared = AppCoordinator() + private var tabBarController: UITabBarController! + private var window: UIWindow? + + func appDidFinishLaunching(window: UIWindow) { + self.window = window + window.rootViewController = GuideViewController() + } + + private var homePageController: HomePageViewController = { + HomePageViewController() + }() + + private var samplePageController: SamplePageViewController = { + SamplePageViewController() + }() + + private var minePageController: MineViewController = { + MineViewController() + }() + + func setTabBarViewController() { + let home = UINavigationController(rootViewController: homePageController) + let sample = UINavigationController(rootViewController: samplePageController) + let mine = UINavigationController(rootViewController: minePageController) + tabBarController = UITabBarController(nibName: nil, bundle: nil) + let navControllers = [home, sample, mine] + tabBarController.viewControllers = navControllers + + for nav in navControllers { + nav.navigationBar.barTintColor = .mainThemeColor // main bar color + let dict: [NSAttributedString.Key: Any] = [ + NSAttributedString.Key.foregroundColor: UIColor.white + ] + nav.navigationBar.titleTextAttributes = dict // title color + nav.navigationBar.tintColor = .white // item color + } + + guard let items = tabBarController.tabBar.items else { + return + } + for (i, m) in zip(items, MenuItemModel.menu) { + i.title = m.name + i.image = UIImage(named: m.image)?.withRenderingMode(.alwaysOriginal) // 总是显示原图不被颜色覆盖 + i.selectedImage = UIImage(named: m.selectedImage)?.withRenderingMode(.alwaysOriginal) + } + // 改变文字颜色 + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.gray], + for: .normal + ) + UITabBarItem.appearance().setTitleTextAttributes( + [NSAttributedString.Key.foregroundColor: UIColor.mainThemeColor], + for: .selected + ) + window?.rootViewController = tabBarController + } + + func setupTabBarIndex(index: Int) { + tabBarController.selectedIndex = index + } + + func setupTabBar(type: TabBarSelectedType) { + switch type { + case .home: + tabBarController.selectedIndex = 0 + case .sample: + tabBarController.selectedIndex = 1 + case .mine: + tabBarController.selectedIndex = 2 + } + } +} diff --git a/Meterage/AppDelegate.swift b/Meterage/AppDelegate.swift new file mode 100644 index 0000000..2067841 --- /dev/null +++ b/Meterage/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + AppCoordinator.shared.appDidFinishLaunching(window: window!) + window?.makeKeyAndVisible() + 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) { + + } + + 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:. + } +} diff --git a/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Meterage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Meterage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/Contents.json b/Meterage/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Meterage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/Contents.json b/Meterage/Assets.xcassets/home.imageset/Contents.json new file mode 100644 index 0000000..464ff3c --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home.imageset/home@1x.png b/Meterage/Assets.xcassets/home.imageset/home@1x.png new file mode 100644 index 0000000..bb040fd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@2x.png b/Meterage/Assets.xcassets/home.imageset/home@2x.png new file mode 100644 index 0000000..efa1acd --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home.imageset/home@3x.png b/Meterage/Assets.xcassets/home.imageset/home@3x.png new file mode 100644 index 0000000..c5d6afb --- /dev/null +++ b/Meterage/Assets.xcassets/home.imageset/home@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/Contents.json b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json new file mode 100644 index 0000000..cff6e14 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png new file mode 100644 index 0000000..0ca795b --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png new file mode 100644 index 0000000..417b780 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png new file mode 100644 index 0000000..2eed495 --- /dev/null +++ b/Meterage/Assets.xcassets/home_selected.imageset/home_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/Contents.json b/Meterage/Assets.xcassets/mine.imageset/Contents.json new file mode 100644 index 0000000..e13643f --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@1x.png b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png new file mode 100644 index 0000000..f29a046 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@2x.png b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png new file mode 100644 index 0000000..53579f7 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine.imageset/mine@3x.png b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png new file mode 100644 index 0000000..e385ca9 --- /dev/null +++ b/Meterage/Assets.xcassets/mine.imageset/mine@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json new file mode 100644 index 0000000..9c44d61 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mine_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png new file mode 100644 index 0000000..30928d6 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png new file mode 100644 index 0000000..4bfabe0 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png new file mode 100644 index 0000000..a7d69d8 --- /dev/null +++ b/Meterage/Assets.xcassets/mine_selected.imageset/mine_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/Contents.json b/Meterage/Assets.xcassets/sample.imageset/Contents.json new file mode 100644 index 0000000..399838a --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@1x.png b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png new file mode 100644 index 0000000..97229f7 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@2x.png b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png new file mode 100644 index 0000000..c638fa5 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample.imageset/sample@3x.png b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png new file mode 100644 index 0000000..a2d6b96 --- /dev/null +++ b/Meterage/Assets.xcassets/sample.imageset/sample@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json new file mode 100644 index 0000000..c033079 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sample_selected@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sample_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sample_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png new file mode 100644 index 0000000..e9d9308 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@1x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png new file mode 100644 index 0000000..c4314a6 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@2x.png Binary files differ diff --git a/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png new file mode 100644 index 0000000..ed6e233 --- /dev/null +++ b/Meterage/Assets.xcassets/sample_selected.imageset/sample_selected@3x.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_background.imageset/Contents.json b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json new file mode 100644 index 0000000..2348ee0 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_background.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png new file mode 100644 index 0000000..3fcca9d --- /dev/null +++ b/Meterage/Assets.xcassets/splash_background.imageset/splash_background.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json new file mode 100644 index 0000000..9adc732 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_casic.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png new file mode 100644 index 0000000..37c7e47 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_casic.imageset/splash_casic.png Binary files differ diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json new file mode 100644 index 0000000..ae9fc61 --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png new file mode 100644 index 0000000..ac2ba0c --- /dev/null +++ b/Meterage/Assets.xcassets/splash_logo.imageset/splash_logo.png Binary files differ diff --git a/Meterage/Base.lproj/LaunchScreen.storyboard b/Meterage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Meterage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Base.lproj/Main.storyboard b/Meterage/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Meterage/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/Extensions/Dictionary.swift b/Meterage/Extensions/Dictionary.swift new file mode 100644 index 0000000..aaed14f --- /dev/null +++ b/Meterage/Extensions/Dictionary.swift @@ -0,0 +1,20 @@ +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +extension Dictionary { + func toJsonString() -> String? { + guard let data = try? JSONSerialization.data(withJSONObject: self, + options: []) + else { + return nil + } + guard let str = String(data: data, encoding: .utf8) else { + return nil + } + return str + } + +} \ No newline at end of file diff --git a/Meterage/Extensions/String.swift b/Meterage/Extensions/String.swift new file mode 100644 index 0000000..c0c475f --- /dev/null +++ b/Meterage/Extensions/String.swift @@ -0,0 +1,32 @@ +// +// String.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyRSA + +extension String { + enum EncryptionError: Error { + case wrongInputData + case encryptFailed + } + + // RSA加密 + func encryptByRSA(publicKey: String) throws -> String { + guard let pubKey = try? PublicKey(base64Encoded: publicKey) else { + throw (EncryptionError.encryptFailed) + } + guard let sourceString = try? ClearMessage(string: self, using: .utf8) else { + throw (EncryptionError.encryptFailed) + } + + if let encrypedStr = try? sourceString.encrypted(with: pubKey, padding: .PKCS1) { + return encrypedStr.base64String + } else { + throw (EncryptionError.encryptFailed) + } + } +} diff --git a/Meterage/Extensions/UIColor.swift b/Meterage/Extensions/UIColor.swift new file mode 100644 index 0000000..2996d38 --- /dev/null +++ b/Meterage/Extensions/UIColor.swift @@ -0,0 +1,30 @@ +// +// UIColor.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import Hue + +extension UIColor { + public class var mainThemeColor: UIColor { + UIColor(hex: "#3d7eff") + } + public class var mainBackground: UIColor { + UIColor(hex: "#F7F7FA") + } + public class var lineColor: UIColor { + UIColor(hex: "#E5E5E5") + } + public class var lightGray: UIColor { + UIColor(hex: "#D3D3D3") + } + public class var gray: UIColor { + UIColor(hex: "#808080") + } + public class var colorText: UIColor { + UIColor(hex: "#555555") + } +} diff --git a/Meterage/Info.plist b/Meterage/Info.plist new file mode 100644 index 0000000..bf6727e --- /dev/null +++ b/Meterage/Info.plist @@ -0,0 +1,11 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + + diff --git a/Meterage/Model/BaseConfigModel.swift b/Meterage/Model/BaseConfigModel.swift new file mode 100644 index 0000000..433d8d7 --- /dev/null +++ b/Meterage/Model/BaseConfigModel.swift @@ -0,0 +1,45 @@ +// +// BaseConfigModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success": true, +// "message": "请求成功", +// "data": { +// "publicKey": "这里是key", +// "kaptcha": false, +// "sid": "7bcfb2df-759a-406f-9f2c-617ca57fa8a5" +// }, +// "code": 200 +// } +struct BaseConfigModel { + var success: Bool + var message: String + var data: KeyModel + var code: Int + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + data = KeyModel(respJson: respJson["data"]) + code = respJson["code"].intValue + } +} + +struct KeyModel { + var publicKey: String + var kaptcha: Bool + var sid: String + + init(respJson: JSON) { + publicKey = respJson["publicKey"].stringValue + kaptcha = respJson["kaptcha"].boolValue + sid = respJson["sid"].stringValue + } +} diff --git a/Meterage/Model/LoginResultModel.swift b/Meterage/Model/LoginResultModel.swift new file mode 100644 index 0000000..5f46840 --- /dev/null +++ b/Meterage/Model/LoginResultModel.swift @@ -0,0 +1,42 @@ +// +// LoginResultModel.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import SwiftyJSON + +// { +// "success" : true, +// "message" : "登录成功", +// "code" : 200, +// "data" : { +// "kaptcha" : "", +// "token" : "d8f89b40-58c0-46b5-9bbc-5919225eb3a0" +// } +// } +struct LoginResultModel { + var success: Bool + var message: String + var code: Int + var data: TokenModel? + + init(respJson: JSON) { + success = respJson["success"].boolValue + message = respJson["message"].stringValue + code = respJson["code"].intValue + data = TokenModel(respJson: respJson["data"]) + } +} + +struct TokenModel { + var kaptcha: String + var token: String + + init(respJson: JSON) { + kaptcha = respJson["kaptcha"].stringValue + token = respJson["token"].stringValue + } +} \ No newline at end of file diff --git a/Meterage/Model/MenuItemModel.swift b/Meterage/Model/MenuItemModel.swift new file mode 100644 index 0000000..a051c57 --- /dev/null +++ b/Meterage/Model/MenuItemModel.swift @@ -0,0 +1,43 @@ +// +// MenuItemModel.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Foundation +import UIKit + +enum MenuItemModel { + case home + case sample + case mine + + var name: String { + switch self { + case .home: return "首页" + case .sample: return "样品" + case .mine: return "我的" + } + } + + var image: String { + switch self { + case .home: return "home" + case .sample: return "sample" + case .mine: return "mine" + } + } + + var selectedImage: String { + switch self { + case .home: return "home_selected" + case .sample: return "sample_selected" + case .mine: return "mine_selected" + } + } + + static var menu: [MenuItemModel] { + [.home, .sample, .mine] + } +} diff --git a/Meterage/Utils/AlertHub.swift b/Meterage/Utils/AlertHub.swift new file mode 100644 index 0000000..116dea9 --- /dev/null +++ b/Meterage/Utils/AlertHub.swift @@ -0,0 +1,21 @@ +// +// AlertHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import UIKit + +class AlertHub { + public static var shared = AlertHub() + + // 普通提示对话框 + func showWaringAlert(controller: UIViewController, message: String) { + let alertController = UIAlertController(title: "提示", message: message, preferredStyle: .alert) + let okAction = UIAlertAction(title: "知道了", style: .default, handler: nil) + alertController.addAction(okAction) + + controller.present(alertController, animated: true, completion: nil) + } +} diff --git a/Meterage/Utils/Constant.swift b/Meterage/Utils/Constant.swift new file mode 100644 index 0000000..e1f40f5 --- /dev/null +++ b/Meterage/Utils/Constant.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import DefaultsKit +import Foundation + +let SCREEN_WIDTH = UIScreen.main.bounds.size.width // 设备屏幕宽 +let SCREEN_HEIGHT = UIScreen.main.bounds.size.height // 设备屏幕高 +let BUTTON_WIDTH = CGFloat(35) // 按钮宽 +let BUTTON_HEIGHT = CGFloat(35) // 按钮高 + +let serverConfigKey = Key("ServerConfig") +let userNameKey = Key("UserName") +let passwordKey = Key("Password") +let tokenKey = Key("Token") + +public enum Constant: String { + // 网络请求相关的地址 + case baseConfig = "/sys/config/baseConfig" + case login = "/sys/user/login" +} diff --git a/Meterage/Utils/HttpRequestCreator.swift b/Meterage/Utils/HttpRequestCreator.swift new file mode 100644 index 0000000..c329214 --- /dev/null +++ b/Meterage/Utils/HttpRequestCreator.swift @@ -0,0 +1,25 @@ +// +// Constant.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation + +class HttpRequestCreator { + + public static var shared = HttpRequestCreator() + + func create(url: String, dic: Dictionary) -> URLRequest { + var request = URLRequest.init(url: URL.init(string: url)!) + let parameters = dic.toJsonString() + + request.httpBody = parameters!.data(using: .utf8) + request.httpMethod = "POST" + request.timeoutInterval = 30 + request.addValue("application/json;charset=UTF-8", forHTTPHeaderField: "Content-Type") + + return request + } +} \ No newline at end of file diff --git a/Meterage/Utils/LoadingHub.swift b/Meterage/Utils/LoadingHub.swift new file mode 100644 index 0000000..3a6d9b1 --- /dev/null +++ b/Meterage/Utils/LoadingHub.swift @@ -0,0 +1,26 @@ +// +// LoadingHub.swift +// Meterage +// +// Created by 203 on 2023/2/2. +// + +import Foundation +import MBProgressHUD + +class LoadingHub { + public static var shared = LoadingHub() + private var window: UIWindow { + UIApplication.shared.keyWindow! + } + public weak var hud: MBProgressHUD? + + func showLoading(text: String = "") { + hud = MBProgressHUD.showAdded(to: window, animated: true) + hud?.label.text = text + } + + func hideLoading() { + MBProgressHUD.hide(for: window, animated: true) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.swift b/Meterage/ViewControllers/Guide/GuideViewController.swift new file mode 100644 index 0000000..4d20747 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.swift @@ -0,0 +1,61 @@ +// +// GuideViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit +import DefaultsKit + +class GuideViewController: UIViewController { + + @IBOutlet var skipButton: UIButton! + private var timer: Timer? + private var countSeconds = 3 + + override func viewDidLoad() { + super.viewDidLoad() + timer = Timer.scheduledTimer( + timeInterval: 1, + target: self, + selector: #selector(countDownTimer), + userInfo: nil, + repeats: true + ) + // 设置默认ip + Defaults.shared.set("http://111.198.10.15:21609", for: serverConfigKey) + } + + // 设置状态栏文字为浅色(白色) + override var preferredStatusBarStyle: UIStatusBarStyle { + .lightContent + } + + // 倒计时 + @objc func countDownTimer() { + if countSeconds < 1 { + timer?.invalidate() + timer = nil + toLogin() + return + } + countSeconds -= 1 + // 设置按钮在倒计时的时候字体不跳动 + skipButton.titleLabel?.text = "跳过 \(countSeconds)s" + skipButton.setTitle("跳过 \(countSeconds)s", for: .normal) + } + + @IBAction func skipCountDown(_ sender: UIButton) { + timer?.invalidate() + timer = nil + toLogin() + } + + @objc func toLogin() { + let destinationController = LoginViewController(nibName: "LoginViewController", bundle: nil) + destinationController.modalPresentationStyle = UIModalPresentationStyle.fullScreen + destinationController.modalTransitionStyle = UIModalTransitionStyle.crossDissolve + present(destinationController, animated: true, completion: nil) + } +} diff --git a/Meterage/ViewControllers/Guide/GuideViewController.xib b/Meterage/ViewControllers/Guide/GuideViewController.xib new file mode 100644 index 0000000..f7cbd43 --- /dev/null +++ b/Meterage/ViewControllers/Guide/GuideViewController.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Home/HomePageViewController.swift b/Meterage/ViewControllers/Home/HomePageViewController.swift new file mode 100644 index 0000000..b5802aa --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.swift @@ -0,0 +1,29 @@ +// +// HomePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class HomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Home/HomePageViewController.xib b/Meterage/ViewControllers/Home/HomePageViewController.xib new file mode 100644 index 0000000..be63e74 --- /dev/null +++ b/Meterage/ViewControllers/Home/HomePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Login/LoginViewController.swift b/Meterage/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 0000000..17a45af --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,109 @@ +// +// LoginViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import Alamofire +import DefaultsKit +import SwiftyJSON +import UIKit +import IQKeyboardManagerSwift + +class LoginViewController: UIViewController, UITextFieldDelegate { + + private let keyboardManager = IQKeyboardManager.shared + private let defaults = Defaults.shared + @IBOutlet var textLabel: UILabel! + @IBOutlet var loginButton: UIButton! + @IBOutlet var userNameView: UITextField! + @IBOutlet var passwordView: UITextField! + + override func viewDidLoad() { + super.viewDidLoad() + keyboardManager.enable = true + keyboardManager.keyboardDistanceFromTextField = 30 + keyboardManager.shouldResignOnTouchOutside = true + keyboardManager.toolbarDoneBarButtonItemText = "完成" + + textLabel.textColor = .mainThemeColor + + loginButton.backgroundColor = .mainThemeColor + loginButton.layer.cornerRadius = 5 // 设置圆角 + + // 实现UITextField代理 + passwordView.delegate = self + + // 设置默认账号密码 + userNameView.text = defaults.get(for: userNameKey) ?? "" + passwordView.text = defaults.get(for: passwordKey) ?? "" + } + + @IBAction func loginAction(_ sender: UIButton) { + let userName = userNameView.text + if userName == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "登录用户名不能为空") + return + } + let password = passwordView.text + if password == "" { + AlertHub.shared.showWaringAlert(controller: self, message: "密码不能为空") + return + } + // 记录账号密码 + defaults.set(userName!, for: userNameKey) + defaults.set(password!, for: passwordKey) + + // 访问后台,开始登录 + let baseURL = defaults.get(for: serverConfigKey)! + let configURL = baseURL + Constant.baseConfig.rawValue + LoadingHub.shared.showLoading(text: "登录中,请稍后") + Alamofire.request(configURL, method: .get).responseJSON { [self] response in + switch response.result { + case let .success(value): + let configModel = BaseConfigModel(respJson: JSON(value)) + // 将密码经由RSA和publicKey加密 + guard let pwdWithKey = try? password?.encryptByRSA(publicKey: configModel.data.publicKey) + else { + return + } + + // 登录 + let loginURL = baseURL + Constant.login.rawValue + let paramDic = ["sid": configModel.data.sid, "username": userName!, "password": pwdWithKey] + + Alamofire.request(HttpRequestCreator.shared.create(url: loginURL, dic: paramDic)).responseJSON { [self] response in + switch response.result { + case let .success(value): + let loginModel = LoginResultModel(respJson: JSON(value)) + if loginModel.code == 200 { + // 将token存起来 + defaults.set(loginModel.data!.token, for: tokenKey) + + // 进入主页 + AppCoordinator.shared.setTabBarViewController() + } else { + AlertHub.shared.showWaringAlert(controller: self, message: "密码错误,无法登陆") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "未知异常,无法登陆") + } + LoadingHub.shared.hideLoading() + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, message: "检验失败,无法登陆") + } + } + } + + // 输入框委托方法具体实现 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let currentLength = (textField.text?.lengthOfBytes(using: .utf8))! - range.length + string.lengthOfBytes(using: .utf8) + if currentLength > 12 { + AlertHub.shared.showWaringAlert(controller: self, message: "密码最长只能输入12位") + return false + } + return true + } +} diff --git a/Meterage/ViewControllers/Login/LoginViewController.xib b/Meterage/ViewControllers/Login/LoginViewController.xib new file mode 100644 index 0000000..e81428c --- /dev/null +++ b/Meterage/ViewControllers/Login/LoginViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Mine/MineViewController.swift b/Meterage/ViewControllers/Mine/MineViewController.swift new file mode 100644 index 0000000..14384b0 --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.swift @@ -0,0 +1,29 @@ +// +// MineViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class MineViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Mine/MineViewController.xib b/Meterage/ViewControllers/Mine/MineViewController.xib new file mode 100644 index 0000000..914cebe --- /dev/null +++ b/Meterage/ViewControllers/Mine/MineViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meterage/ViewControllers/Sample/SamplePageViewController.swift b/Meterage/ViewControllers/Sample/SamplePageViewController.swift new file mode 100644 index 0000000..cd92e4f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.swift @@ -0,0 +1,29 @@ +// +// SamplePageViewController.swift +// Meterage +// +// Created by 203 on 2023/2/1. +// + +import UIKit + +class SamplePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // 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/Meterage/ViewControllers/Sample/SamplePageViewController.xib b/Meterage/ViewControllers/Sample/SamplePageViewController.xib new file mode 100644 index 0000000..e09dc7f --- /dev/null +++ b/Meterage/ViewControllers/Sample/SamplePageViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..37e55de --- /dev/null +++ b/Podfile @@ -0,0 +1,38 @@ +# Uncomment the next line to define a global platform for your project +platform :ios, '12.0' + +target 'Meterage' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for Meterage + + # 网络请求框架 + pod 'Alamofire', '~> 4.7' + # RSA加密 + pod 'SwiftyRSA' + # JSON解析 + pod 'SwiftyJSON' + # 加载控件 + pod 'MBProgressHUD' + # Kingfisher 是一个下载、缓存网络图片的轻量级纯swift库 + pod 'Kingfisher' + # 自动约束布局 + pod 'SnapKit' + # Model转JSON + pod 'HandyJSON' + # Toast提示 + pod 'Toast-Swift' + # 本地对象存储,类似sp + pod 'DefaultsKit' + # 16进制颜色转换 + pod 'Hue' + # 图片选择器 + pod 'HXPHPicker' + # 大图查看 + pod 'ZLPhotoBrowser' + # 刷新控件 + pod 'MJRefresh' + # 键盘遮挡解决方案 + pod 'IQKeyboardManagerSwift', '~> 6.5.0' +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..646e40d --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,102 @@ +PODS: + - Alamofire (4.9.1) + - DefaultsKit (0.2.0) + - HandyJSON (5.0.2) + - Hue (5.0.0) + - HXPHPicker (1.4.6): + - HXPHPicker/Full (= 1.4.6) + - HXPHPicker/Camera (1.4.6): + - HXPHPicker/Camera/Lite (= 1.4.6) + - HXPHPicker/Camera/Location (= 1.4.6) + - HXPHPicker/Camera/Lite (1.4.6): + - HXPHPicker/Core + - HXPHPicker/Camera/Location (1.4.6): + - HXPHPicker/Camera/Lite + - HXPHPicker/Core + - HXPHPicker/Core (1.4.6) + - HXPHPicker/Editor (1.4.6): + - HXPHPicker/Editor/KF (= 1.4.6) + - HXPHPicker/Editor/Lite (= 1.4.6) + - HXPHPicker/Editor/KF (1.4.6): + - HXPHPicker/Editor/Lite + - Kingfisher (~> 7.0) + - HXPHPicker/Editor/Lite (1.4.6): + - HXPHPicker/Core + - HXPHPicker/Full (1.4.6): + - HXPHPicker/Camera + - HXPHPicker/Editor + - HXPHPicker/Picker + - HXPHPicker/Picker (1.4.6): + - HXPHPicker/Picker/KF (= 1.4.6) + - HXPHPicker/Picker/Lite (= 1.4.6) + - HXPHPicker/Picker/KF (1.4.6): + - HXPHPicker/Picker/Lite + - Kingfisher (~> 7.0) + - HXPHPicker/Picker/Lite (1.4.6): + - HXPHPicker/Core + - IQKeyboardManagerSwift (6.5.11) + - Kingfisher (7.5.0) + - MBProgressHUD (1.2.0) + - MJRefresh (3.7.5) + - SnapKit (5.6.0) + - SwiftyJSON (5.0.1) + - SwiftyRSA (1.7.0): + - SwiftyRSA/ObjC (= 1.7.0) + - SwiftyRSA/ObjC (1.7.0) + - Toast-Swift (5.0.1) + - ZLPhotoBrowser (4.3.8): + - ZLPhotoBrowser/Core (= 4.3.8) + - ZLPhotoBrowser/Core (4.3.8) + +DEPENDENCIES: + - Alamofire (~> 4.7) + - DefaultsKit + - HandyJSON + - Hue + - HXPHPicker + - IQKeyboardManagerSwift (~> 6.5.0) + - Kingfisher + - MBProgressHUD + - MJRefresh + - SnapKit + - SwiftyJSON + - SwiftyRSA + - Toast-Swift + - ZLPhotoBrowser + +SPEC REPOS: + trunk: + - Alamofire + - DefaultsKit + - HandyJSON + - Hue + - HXPHPicker + - IQKeyboardManagerSwift + - Kingfisher + - MBProgressHUD + - MJRefresh + - SnapKit + - SwiftyJSON + - SwiftyRSA + - Toast-Swift + - ZLPhotoBrowser + +SPEC CHECKSUMS: + Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 + DefaultsKit: 6c767941b2c3fe34c4d70e300e6c3b80c94964dd + HandyJSON: 9e4e236f5d2dbefad5155a77417bbea438201c03 + Hue: c129cb67be7d093a82bbbc30ce8a96757bf6f37a + HXPHPicker: 44b541272c3066196da5d0af6d7f5ac61234b8cc + IQKeyboardManagerSwift: c7955c0bdbf7b2eb29bb7daaa44e3d90f55a9a85 + Kingfisher: b9c2a4a4af2990a768445c277359b27bde287d71 + MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406 + MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961 + SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 + SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e + SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6 + Toast-Swift: 9b6a70f28b3bf0b96c40d46c0c4b9d6639846711 + ZLPhotoBrowser: a36e618898b781c225672115938ed861a11b2121 + +PODFILE CHECKSUM: b4258afd951be3aff3483a074561782bee1fc09e + +COCOAPODS: 1.11.3