diff --git a/BeeKit/Util/UIDevice.swift b/BeeKit/Util/UIDevice.swift deleted file mode 100644 index 1e42b5dc..00000000 --- a/BeeKit/Util/UIDevice.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// PublicDevice.swift -// BeeSwift -// -// Created by Andy Brett on 6/8/17. -// Copyright © 2017 APB. All rights reserved. -// - -import Foundation -import UIKit - -public extension UIDevice { - - var modelName: String { - var systemInfo = utsname() - uname(&systemInfo) - let machineMirror = Mirror(reflecting: systemInfo.machine) - let identifier = machineMirror.children.reduce("") { identifier, element in - guard let value = element.value as? Int8, value != 0 else { return identifier } - return identifier + String(UnicodeScalar(UInt8(value))) - } - - switch identifier { - case "iPod5,1": return "iPod Touch 5" - case "iPod7,1": return "iPod Touch 6" - case "iPhone3,1", "iPhone3,2", "iPhone3,3": return "iPhone 4" - case "iPhone4,1": return "iPhone 4s" - case "iPhone5,1", "iPhone5,2": return "iPhone 5" - case "iPhone5,3", "iPhone5,4": return "iPhone 5c" - case "iPhone6,1", "iPhone6,2": return "iPhone 5s" - case "iPhone7,2": return "iPhone 6" - case "iPhone7,1": return "iPhone 6 Plus" - case "iPhone8,1": return "iPhone 6s" - case "iPhone8,2": return "iPhone 6s Plus" - case "iPhone9,1", "iPhone9,3": return "iPhone 7" - case "iPhone9,2", "iPhone9,4": return "iPhone 7 Plus" - case "iPhone8,4": return "iPhone SE" - case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4":return "iPad 2" - case "iPad3,1", "iPad3,2", "iPad3,3": return "iPad 3" - case "iPad3,4", "iPad3,5", "iPad3,6": return "iPad 4" - case "iPad4,1", "iPad4,2", "iPad4,3": return "iPad Air" - case "iPad5,3", "iPad5,4": return "iPad Air 2" - case "iPad2,5", "iPad2,6", "iPad2,7": return "iPad Mini" - case "iPad4,4", "iPad4,5", "iPad4,6": return "iPad Mini 2" - case "iPad4,7", "iPad4,8", "iPad4,9": return "iPad Mini 3" - case "iPad5,1", "iPad5,2": return "iPad Mini 4" - case "iPad6,3", "iPad6,4", "iPad6,7", "iPad6,8":return "iPad Pro" - case "AppleTV5,3": return "Apple TV" - case "i386", "x86_64": return "Simulator" - default: return identifier - } - } - -} diff --git a/BeeSwift.xcodeproj/project.pbxproj b/BeeSwift.xcodeproj/project.pbxproj index 955f40ba..cd8ae4b7 100644 --- a/BeeSwift.xcodeproj/project.pbxproj +++ b/BeeSwift.xcodeproj/project.pbxproj @@ -37,7 +37,6 @@ A1B672401B0989E800584782 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1B6723F1B0989E800584782 /* UIKit.framework */; }; A1B672421B0989ED00584782 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1B672411B0989ED00584782 /* CoreGraphics.framework */; }; A1BD0D181AEB30A5001EDE8B /* GoalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1BD0D171AEB30A5001EDE8B /* GoalViewController.swift */; }; - A1BD0D1C1AEB34E0001EDE8B /* GalleryNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1BD0D1B1AEB34E0001EDE8B /* GalleryNavigationController.swift */; }; A1BE73AA1E8B45BF00DEC4DB /* ChooseHKMetricViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1BE73A91E8B45BF00DEC4DB /* ChooseHKMetricViewController.swift */; }; A1BE73AC1E8B47E700DEC4DB /* HealthKitMetricTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1BE73AB1E8B47E700DEC4DB /* HealthKitMetricTableViewCell.swift */; }; A1D853281EB0DE0700FC75DE /* TodayTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1D853271EB0DE0700FC75DE /* TodayTableViewCell.swift */; }; @@ -85,7 +84,6 @@ E458C81A2AD11CB5000DCA5C /* WorkoutMinutesHealthKitMetric.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4040D732A7B5F0E008E7D0E /* WorkoutMinutesHealthKitMetric.swift */; }; E458C81B2AD11CD8000DCA5C /* UIColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1453B341AED9184006F48DA /* UIColorExtension.swift */; }; E458C81C2AD11CDE000DCA5C /* UIFontExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1C170DF1BEEB3110018D32B /* UIFontExtension.swift */; }; - E458C81D2AD11CEC000DCA5C /* UIDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = A11488BD1EE9B0CE003316E1 /* UIDevice.swift */; }; E458C81E2AD11D05000DCA5C /* DateUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E46FF15A2984C522009F8C7A /* DateUtils.swift */; }; E458C8202AD11D35000DCA5C /* SwiftyJSON in Frameworks */ = {isa = PBXBuildFile; productRef = E458C81F2AD11D35000DCA5C /* SwiftyJSON */; }; E458C8222AD11D40000DCA5C /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = E458C8212AD11D40000DCA5C /* Alamofire */; }; @@ -260,7 +258,6 @@ 9B8CA57C24B120CA009C86C2 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; A10D4E921B07948500A72D29 /* DatapointsTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatapointsTableView.swift; sourceTree = ""; }; A10DC2DE207BFCBA00FB7B3A /* RemoveHKMetricViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoveHKMetricViewController.swift; sourceTree = ""; }; - A11488BD1EE9B0CE003316E1 /* UIDevice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIDevice.swift; sourceTree = ""; }; A11A87C51FEBFF7200A43E47 /* ChooseGoalSortViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChooseGoalSortViewController.swift; sourceTree = ""; }; A11BA9A31FCE54E3004BB425 /* HealthStoreManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthStoreManager.swift; sourceTree = ""; }; A11BC2D81FFAD5BC00E56064 /* TimerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimerViewController.swift; sourceTree = ""; }; @@ -304,7 +301,6 @@ A1B672411B0989ED00584782 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; A1BCE9841AFFFB3A007322CC /* RequestManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestManager.swift; sourceTree = ""; }; A1BD0D171AEB30A5001EDE8B /* GoalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GoalViewController.swift; sourceTree = ""; }; - A1BD0D1B1AEB34E0001EDE8B /* GalleryNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GalleryNavigationController.swift; sourceTree = ""; }; A1BD3E021AE41AE400B1390A /* BeeSwift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BeeSwift-Bridging-Header.h"; sourceTree = ""; }; A1BE73A91E8B45BF00DEC4DB /* ChooseHKMetricViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChooseHKMetricViewController.swift; sourceTree = ""; }; A1BE73AB1E8B47E700DEC4DB /* HealthKitMetricTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HealthKitMetricTableViewCell.swift; sourceTree = ""; }; @@ -516,7 +512,6 @@ children = ( A1C11B471B06F5D100D22871 /* Constants.swift */, A12BA9531AFFF21800AFEF32 /* Crypto.swift */, - A11488BD1EE9B0CE003316E1 /* UIDevice.swift */, E462BA2D29A31C3B00E80EF0 /* SynchronizedBox.swift */, ); path = Util; @@ -693,7 +688,6 @@ isa = PBXGroup; children = ( A11A87C51FEBFF7200A43E47 /* ChooseGoalSortViewController.swift */, - A1BD0D1B1AEB34E0001EDE8B /* GalleryNavigationController.swift */, A196CB1E1AE4142F00B90A3E /* GalleryViewController.swift */, ); path = Gallery; @@ -1155,7 +1149,6 @@ A1453B3F1AEDFCC8006F48DA /* SignInViewController.swift in Sources */, A1E618E41E7934C700D8ED93 /* HealthKitConfigTableViewCell.swift in Sources */, E4B083392932F90400A71564 /* ConfigureHKMetricViewController.swift in Sources */, - A1BD0D1C1AEB34E0001EDE8B /* GalleryNavigationController.swift in Sources */, E43BEA842A036A9C00FC3A38 /* LogReader.swift in Sources */, A196CB1F1AE4142F00B90A3E /* GalleryViewController.swift in Sources */, A1BE73AA1E8B45BF00DEC4DB /* ChooseHKMetricViewController.swift in Sources */, @@ -1241,7 +1234,6 @@ E46071022B451FAC00305DB4 /* BeeminderPersistentContainer.swift in Sources */, E4E63C732C5DDE98005E00DA /* GoalExtensions.swift in Sources */, E458C8252AD11E01000DCA5C /* BSButton.swift in Sources */, - E458C81D2AD11CEC000DCA5C /* UIDevice.swift in Sources */, E4E63C6D2C3F9083005E00DA /* DataPointManager.swift in Sources */, E458C8172AD11CA7000DCA5C /* TotalSleepMinutes.swift in Sources */, E4E8DD3B2BE87F890059C64F /* Goal.swift in Sources */, diff --git a/BeeSwift/Gallery/GalleryNavigationController.swift b/BeeSwift/Gallery/GalleryNavigationController.swift deleted file mode 100644 index 5e919649..00000000 --- a/BeeSwift/Gallery/GalleryNavigationController.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// GalleryNavigationController.swift -// BeeSwift -// -// Created by Andy Brett on 4/24/15. -// Copyright (c) 2015 APB. All rights reserved. -// - -import Foundation - -class GalleryNavigationController: UINavigationController { -}