diff --git a/PennMobile.xcodeproj/project.pbxproj b/PennMobile.xcodeproj/project.pbxproj index a0ccd5276..9de09c6e3 100644 --- a/PennMobile.xcodeproj/project.pbxproj +++ b/PennMobile.xcodeproj/project.pbxproj @@ -45,10 +45,7 @@ 42632CAA2CB9C77B0028CC31 /* ScannerViewfinder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B142CB9C77B0028CC31 /* ScannerViewfinder.swift */; }; 42632CAB2CB9C77B0028CC31 /* ScannerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B152CB9C77B0028CC31 /* ScannerViewModel.swift */; }; 42632CAC2CB9C77B0028CC31 /* TicketingAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B172CB9C77B0028CC31 /* TicketingAPI.swift */; }; - 42632CAD2CB9C77B0028CC31 /* ContactCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B192CB9C77B0028CC31 /* ContactCell.swift */; }; 42632CAE2CB9C77B0028CC31 /* ContactManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B1A2CB9C77B0028CC31 /* ContactManager.swift */; }; - 42632CAF2CB9C77B0028CC31 /* ContactsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B1B2CB9C77B0028CC31 /* ContactsTableViewController.swift */; }; - 42632CB02CB9C77B0028CC31 /* SupportItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 42632B1D2CB9C77B0028CC31 /* SupportItem.m */; }; 42632CB12CB9C77B0028CC31 /* CourseAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B1F2CB9C77B0028CC31 /* CourseAlertController.swift */; }; 42632CB22CB9C77B0028CC31 /* CourseAlertCreateController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B202CB9C77B0028CC31 /* CourseAlertCreateController.swift */; }; 42632CB32CB9C77B0028CC31 /* CourseAlertSettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B212CB9C77B0028CC31 /* CourseAlertSettingsController.swift */; }; @@ -91,7 +88,6 @@ 42632CE32CB9C77B0028CC31 /* FitnessRoomRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B662CB9C77B0028CC31 /* FitnessRoomRow.swift */; }; 42632CE42CB9C77B0028CC31 /* FitnessSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B672CB9C77B0028CC31 /* FitnessSettingsView.swift */; }; 42632CE52CB9C77B0028CC31 /* FitnessView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B682CB9C77B0028CC31 /* FitnessView.swift */; }; - 42632CE62CB9C77B0028CC31 /* FitnessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B692CB9C77B0028CC31 /* FitnessViewController.swift */; }; 42632CE72CB9C77B0028CC31 /* AnnouncementHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B6B2CB9C77B0028CC31 /* AnnouncementHeaderView.swift */; }; 42632CE82CB9C77B0028CC31 /* GenericControllers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B6C2CB9C77B0028CC31 /* GenericControllers.swift */; }; 42632CE92CB9C77B0028CC31 /* MoveableTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42632B6D2CB9C77B0028CC31 /* MoveableTableViewController.swift */; }; @@ -359,8 +355,9 @@ 4273BCFF2BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4273BCFE2BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy */; }; 4273BD012BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4273BCFE2BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy */; }; 4273BD022BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4273BCFE2BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy */; }; - 6C23AF9526E57903002F60F0 /* (null) in Sources */ = {isa = PBXBuildFile; }; - 6C369A1526E39BC100721CA1 /* (null) in Sources */ = {isa = PBXBuildFile; }; + 42ABED2A2CE8EB8D006533CD /* ContactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42ABED292CE8EB8D006533CD /* ContactsView.swift */; }; + 42ABED2C2CE8EB9F006533CD /* ContactModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42ABED2B2CE8EB9F006533CD /* ContactModel.swift */; }; + 42D89D552CE94FC9005DFFD4 /* ContactRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42D89D542CE94FC9005DFFD4 /* ContactRowView.swift */; }; 6C4CC1FA26E6B1720000B4A8 /* SwiftyJSON in Frameworks */ = {isa = PBXBuildFile; productRef = 6C4CC1F926E6B1720000B4A8 /* SwiftyJSON */; }; 6CA1ACDB271D2D5000EDB967 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 6CA1ACDA271D2D5000EDB967 /* Kingfisher */; }; 6CE12F9026E82DC600284D9F /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 6CE12F8F26E82DC600284D9F /* FirebaseAnalytics */; }; @@ -470,11 +467,7 @@ 42632B142CB9C77B0028CC31 /* ScannerViewfinder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScannerViewfinder.swift; sourceTree = ""; }; 42632B152CB9C77B0028CC31 /* ScannerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScannerViewModel.swift; sourceTree = ""; }; 42632B172CB9C77B0028CC31 /* TicketingAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicketingAPI.swift; sourceTree = ""; }; - 42632B192CB9C77B0028CC31 /* ContactCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactCell.swift; sourceTree = ""; }; 42632B1A2CB9C77B0028CC31 /* ContactManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactManager.swift; sourceTree = ""; }; - 42632B1B2CB9C77B0028CC31 /* ContactsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsTableViewController.swift; sourceTree = ""; }; - 42632B1C2CB9C77B0028CC31 /* SupportItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SupportItem.h; sourceTree = ""; }; - 42632B1D2CB9C77B0028CC31 /* SupportItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SupportItem.m; sourceTree = ""; }; 42632B1F2CB9C77B0028CC31 /* CourseAlertController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseAlertController.swift; sourceTree = ""; }; 42632B202CB9C77B0028CC31 /* CourseAlertCreateController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseAlertCreateController.swift; sourceTree = ""; }; 42632B212CB9C77B0028CC31 /* CourseAlertSettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseAlertSettingsController.swift; sourceTree = ""; }; @@ -519,7 +512,6 @@ 42632B662CB9C77B0028CC31 /* FitnessRoomRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FitnessRoomRow.swift; sourceTree = ""; }; 42632B672CB9C77B0028CC31 /* FitnessSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FitnessSettingsView.swift; sourceTree = ""; }; 42632B682CB9C77B0028CC31 /* FitnessView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FitnessView.swift; sourceTree = ""; }; - 42632B692CB9C77B0028CC31 /* FitnessViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FitnessViewController.swift; sourceTree = ""; }; 42632B6B2CB9C77B0028CC31 /* AnnouncementHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnnouncementHeaderView.swift; sourceTree = ""; }; 42632B6C2CB9C77B0028CC31 /* GenericControllers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenericControllers.swift; sourceTree = ""; }; 42632B6D2CB9C77B0028CC31 /* MoveableTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveableTableViewController.swift; sourceTree = ""; }; @@ -739,8 +731,6 @@ 42632C852CB9C77B0028CC31 /* SublettingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SublettingViewModel.swift; sourceTree = ""; }; 42632C872CB9C77B0028CC31 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 42632C882CB9C77B0028CC31 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 42632C892CB9C77B0028CC31 /* PennMobile-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PennMobile-Bridging-Header.h"; sourceTree = ""; }; - 42632C8A2CB9C77B0028CC31 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = ""; }; 42632C8C2CB9C77B0028CC31 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 42632C8D2CB9C77B0028CC31 /* PennMobile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PennMobile.entitlements; sourceTree = ""; }; 42632DC72CB9C77B0028CC31 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -806,6 +796,9 @@ 42632E232CB9C77B0028CC31 /* SublettingModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SublettingModels.swift; sourceTree = ""; }; 42632E252CB9C77B0028CC31 /* PennMobileShared.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PennMobileShared.h; sourceTree = ""; }; 4273BCFE2BD2D8D80070C1B8 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = SOURCE_ROOT; }; + 42ABED292CE8EB8D006533CD /* ContactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsView.swift; sourceTree = ""; }; + 42ABED2B2CE8EB9F006533CD /* ContactModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactModel.swift; sourceTree = ""; }; + 42D89D542CE94FC9005DFFD4 /* ContactRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactRowView.swift; sourceTree = ""; }; 6C1991BC27B5CA4D00BBB402 /* NotificationDevelopment.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NotificationDevelopment.xcconfig; sourceTree = ""; }; 6C1991BD27B5CA8500BBB402 /* NotificationRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NotificationRelease.xcconfig; sourceTree = ""; }; 6C392E3827B5BE1C0097640B /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; @@ -996,11 +989,10 @@ 42632B1E2CB9C77B0028CC31 /* Contacts */ = { isa = PBXGroup; children = ( - 42632B192CB9C77B0028CC31 /* ContactCell.swift */, + 42ABED2B2CE8EB9F006533CD /* ContactModel.swift */, + 42D89D542CE94FC9005DFFD4 /* ContactRowView.swift */, + 42ABED292CE8EB8D006533CD /* ContactsView.swift */, 42632B1A2CB9C77B0028CC31 /* ContactManager.swift */, - 42632B1B2CB9C77B0028CC31 /* ContactsTableViewController.swift */, - 42632B1C2CB9C77B0028CC31 /* SupportItem.h */, - 42632B1D2CB9C77B0028CC31 /* SupportItem.m */, ); path = Contacts; sourceTree = ""; @@ -1203,7 +1195,6 @@ 42632B662CB9C77B0028CC31 /* FitnessRoomRow.swift */, 42632B672CB9C77B0028CC31 /* FitnessSettingsView.swift */, 42632B682CB9C77B0028CC31 /* FitnessView.swift */, - 42632B692CB9C77B0028CC31 /* FitnessViewController.swift */, ); path = Fitness; sourceTree = ""; @@ -1869,8 +1860,6 @@ children = ( 42632C872CB9C77B0028CC31 /* GoogleService-Info.plist */, 42632C882CB9C77B0028CC31 /* Info.plist */, - 42632C892CB9C77B0028CC31 /* PennMobile-Bridging-Header.h */, - 42632C8A2CB9C77B0028CC31 /* PrefixHeader.pch */, ); path = Supporting_Files; sourceTree = ""; @@ -2383,10 +2372,7 @@ 42632CAA2CB9C77B0028CC31 /* ScannerViewfinder.swift in Sources */, 42632CAB2CB9C77B0028CC31 /* ScannerViewModel.swift in Sources */, 42632CAC2CB9C77B0028CC31 /* TicketingAPI.swift in Sources */, - 42632CAD2CB9C77B0028CC31 /* ContactCell.swift in Sources */, 42632CAE2CB9C77B0028CC31 /* ContactManager.swift in Sources */, - 42632CAF2CB9C77B0028CC31 /* ContactsTableViewController.swift in Sources */, - 42632CB02CB9C77B0028CC31 /* SupportItem.m in Sources */, 42632CB12CB9C77B0028CC31 /* CourseAlertController.swift in Sources */, 42632CB22CB9C77B0028CC31 /* CourseAlertCreateController.swift in Sources */, 42632CB32CB9C77B0028CC31 /* CourseAlertSettingsController.swift in Sources */, @@ -2401,6 +2387,7 @@ 42632CBC2CB9C77B0028CC31 /* SearchResultsCell.swift in Sources */, 42632CBD2CB9C77B0028CC31 /* ZeroCourseAlertsCell.swift in Sources */, 42632CBE2CB9C77B0028CC31 /* CoursesViewModel.swift in Sources */, + 42ABED2A2CE8EB8D006533CD /* ContactsView.swift in Sources */, 42632CBF2CB9C77B0028CC31 /* CoursesDayView.swift in Sources */, 42632CC02CB9C77B0028CC31 /* CoursesView.swift in Sources */, 42632CC12CB9C77B0028CC31 /* CoursesViewController.swift in Sources */, @@ -2420,6 +2407,7 @@ 42632CD62CB9C77B0028CC31 /* DiningView.swift in Sources */, 42632CD72CB9C77B0028CC31 /* DiningViewHeader.swift in Sources */, 42632CD82CB9C77B0028CC31 /* DiningAnalyticsView.swift in Sources */, + 42D89D552CE94FC9005DFFD4 /* ContactRowView.swift in Sources */, 42632CD92CB9C77B0028CC31 /* DiningLoginNavigationView.swift in Sources */, 42632CDA2CB9C77B0028CC31 /* DiningLoginViewSwiftUI.swift in Sources */, 42632CDB2CB9C77B0028CC31 /* DiningSettingsView.swift in Sources */, @@ -2429,7 +2417,6 @@ 42632CE32CB9C77B0028CC31 /* FitnessRoomRow.swift in Sources */, 42632CE42CB9C77B0028CC31 /* FitnessSettingsView.swift in Sources */, 42632CE52CB9C77B0028CC31 /* FitnessView.swift in Sources */, - 42632CE62CB9C77B0028CC31 /* FitnessViewController.swift in Sources */, 42632CE72CB9C77B0028CC31 /* AnnouncementHeaderView.swift in Sources */, 42632CE82CB9C77B0028CC31 /* GenericControllers.swift in Sources */, 42632CE92CB9C77B0028CC31 /* MoveableTableViewController.swift in Sources */, @@ -2477,6 +2464,7 @@ 42632D112CB9C77B0028CC31 /* GSRTimeSlot.swift in Sources */, 42632D122CB9C77B0028CC31 /* GSRGroupNetworkManager..swift in Sources */, 42632D132CB9C77B0028CC31 /* GSRNetworkManager.swift in Sources */, + 42ABED2C2CE8EB9F006533CD /* ContactModel.swift in Sources */, 42632D142CB9C77B0028CC31 /* GSRManageGroupViewModel.swift in Sources */, 42632D152CB9C77B0028CC31 /* GSRViewModel.swift in Sources */, 42632D162CB9C77B0028CC31 /* CreateGroupCell.swift in Sources */, @@ -2654,8 +2642,6 @@ 42632DC52CB9C77B0028CC31 /* SublettingAPI.swift in Sources */, 42632DC62CB9C77B0028CC31 /* SublettingViewModel.swift in Sources */, 89EA262E290F9411008F26CF /* Intents.intentdefinition in Sources */, - 6C369A1526E39BC100721CA1 /* (null) in Sources */, - 6C23AF9526E57903002F60F0 /* (null) in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2875,7 +2861,7 @@ DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = VU59R57FGM; EXCLUDED_ARCHS = ""; - GCC_PREFIX_HEADER = PennMobile/Supporting_Files/PrefixHeader.pch; + GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = PennMobile/Supporting_Files/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -2892,7 +2878,7 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Penn Mobile - Development"; - SWIFT_OBJC_BRIDGING_HEADER = "PennMobile/Supporting_Files/PennMobile-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2914,7 +2900,7 @@ DEVELOPMENT_TEAM = VU59R57FGM; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = VU59R57FGM; EXCLUDED_ARCHS = ""; - GCC_PREFIX_HEADER = PennMobile/Supporting_Files/PrefixHeader.pch; + GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = PennMobile/Supporting_Files/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -2932,7 +2918,7 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = "Penn Mobile - Distribution"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Penn Mobile - Distribution"; - SWIFT_OBJC_BRIDGING_HEADER = "PennMobile/Supporting_Files/PennMobile-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/PennMobile/Banners/BannerDescription.swift b/PennMobile/Banners/BannerDescription.swift index 4b6b90467..b818a5446 100644 --- a/PennMobile/Banners/BannerDescription.swift +++ b/PennMobile/Banners/BannerDescription.swift @@ -6,6 +6,8 @@ // Copyright © 2023 PennLabs. All rights reserved. // +import Foundation + struct BannerDescription: Equatable, Codable { var image: URL var text: String diff --git a/PennMobile/Buildings/Cells/MenuTableView.swift b/PennMobile/Buildings/Cells/MenuTableView.swift index ba11d6651..93d4d7482 100755 --- a/PennMobile/Buildings/Cells/MenuTableView.swift +++ b/PennMobile/Buildings/Cells/MenuTableView.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit class MenuTableView: UITableView { override var contentSize: CGSize { diff --git a/PennMobile/Contacts/ContactCell.swift b/PennMobile/Contacts/ContactCell.swift deleted file mode 100755 index 5934dbb5d..000000000 --- a/PennMobile/Contacts/ContactCell.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// SupportCell.swift -// PennMobile -// -// Created by Josh Doman on 8/12/17. -// Copyright © 2017 PennLabs. All rights reserved. -// - -import UIKit - -class ContactCell: UITableViewCell { - - var contact: SupportItem! { - didSet { - contactNameLabel.text = contact.name - textLabel?.text = contact.name - setDetailTextLabel() - } - } - - var isExpanded: Bool = false { - didSet { - setDetailTextLabel() - } - } - - func setDetailTextLabel() { - if isExpanded, let phoneNumber = contact?.phone { - if let description = self.contact?.descriptionText { - self.detailTextLabel?.text = String(format: "%@\n%@", arguments: [phoneNumber, description]) - } else { - self.detailTextLabel?.text = phoneNumber - } - } else { - detailTextLabel?.text = nil - } - } - - private lazy var phoneButton: UIButton = { - let phoneImage = UIImage(named: "phone.png") - let phoneButton = UIButton(type: .custom) - phoneButton.translatesAutoresizingMaskIntoConstraints = false - phoneButton.setImage(phoneImage, for: .normal) - phoneButton.addTarget(self, action: #selector(handleCall(_:)), for: .touchUpInside) - phoneButton.isUserInteractionEnabled = true - return phoneButton - }() - - private let contactNameLabel: UILabel = { - let contactLabel = UILabel() - contactLabel.font = UIFont(name: "HelveticaNeue", size: 18) - contactLabel.text = "Penn Walk" - contactLabel.translatesAutoresizingMaskIntoConstraints = false - return contactLabel - }() - - weak var delegate: ContactCellDelegate? - - override func layoutSubviews() { - super.layoutSubviews() - - textLabel?.frame = CGRect(x: 64, y: textLabel!.frame.origin.y, width: textLabel!.frame.width, height: textLabel!.frame.height) - detailTextLabel?.frame = CGRect(x: 64, y: detailTextLabel!.frame.origin.y, width: contentView.bounds.width - 64 - 20, height: detailTextLabel!.frame.height) - } - - override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { - super.init(style: .subtitle, reuseIdentifier: reuseIdentifier) - - self.detailTextLabel?.numberOfLines = 5 - - let fakeButton = UIButton() - fakeButton.isUserInteractionEnabled = true - fakeButton.addTarget(self, action: #selector(handleCall(_:)), for: .touchUpInside) - - addSubview(fakeButton) - addSubview(phoneButton) - - _ = fakeButton.anchor(topAnchor, left: leftAnchor, bottom: bottomAnchor, right: nil, topConstant: 0, leftConstant: 0, bottomConstant: 0, rightConstant: 0, widthConstant: 64, heightConstant: 0) - - _ = phoneButton.anchor(nil, left: leftAnchor, bottom: nil, right: nil, topConstant: 0, leftConstant: 16, bottomConstant: 0, rightConstant: 0, widthConstant: 30, heightConstant: 30) - phoneButton.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true - } - - @objc internal func handleCall(_ sender: UIButton) { - if let phoneNumber = contact.phoneFiltered { - delegate?.call(number: phoneNumber) - } - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } -} diff --git a/PennMobile/Contacts/ContactManager.swift b/PennMobile/Contacts/ContactManager.swift index 006f2584c..4c3a8ae15 100755 --- a/PennMobile/Contacts/ContactManager.swift +++ b/PennMobile/Contacts/ContactManager.swift @@ -1,83 +1,122 @@ // -// EmergencyContacts.swift +// ContactManager.swift // PennMobile // -// Created by Josh Doman on 5/12/17. -// Copyright © 2017 PennLabs. All rights reserved. +// Created by Jordan Hochman on 11/16/24. +// Copyright © 2024 PennLabs. All rights reserved. // import Contacts -extension SupportItem { - +extension Contact { var cnContact: CNMutableContact { let contact = CNMutableContact() contact.givenName = self.contactName contact.phoneNumbers = [CNLabeledValue( - label: CNLabelPhoneNumberiPhone, + label: CNLabelPhoneNumberMain, value: CNPhoneNumber(stringValue: self.phoneFiltered))] - if let desc = self.descriptionText { + if let desc = self.description { contact.note = desc } return contact } - } class ContactManager: NSObject { - static let shared = ContactManager() + private let contactStore = CNContactStore() + + func requestAccess() async -> Bool { + return await withCheckedContinuation { continuation in + contactStore.requestAccess(for: .contacts) { granted, _ in + continuation.resume(returning: granted) + } + } + } + + func doesHaveAccess() -> Bool { + let access = CNContactStore.authorizationStatus(for: .contacts) + + var valid: [CNAuthorizationStatus] = [.authorized] + if #available(iOS 18.0, *) { + valid.append(.limited) + } + return valid.contains(access) + } - func save(_ items: [SupportItem], callback: @escaping (_ success: Bool) -> Void) { + func saveContacts(_ contacts: [Contact]) -> Bool { let saveRequest = CNSaveRequest() - let store = CNContactStore() - for item in items { - saveRequest.add(item.cnContact, toContainerWithIdentifier: nil) + for contact in contacts { + saveRequest.add(contact.cnContact, toContainerWithIdentifier: nil) } + do { - try store.execute(saveRequest) - callback(true) + try contactStore.execute(saveRequest) + return true } catch { - callback(false) + return false } } - func delete(_ items: [SupportItem], callback: (_ success: Bool) -> Void) { - var successful = true - for item in items { - delete(item) { (success) in - successful = successful ? success : false + func deleteContacts(_ contacts: [Contact]) -> Bool { + var success = true + for contact in contacts { + if !deleteContact(contact) { + success = false } } - callback(successful) + return success } - func delete(_ item: SupportItem, callback2: (_ success: Bool) -> Void) { - let store = CNContactStore() - let predicate = CNContact.predicateForContacts(matchingName: item.contactName) + func deleteContact(_ contact: Contact) -> Bool { + let predicate = CNContact.predicateForContacts(matchingName: contact.contactName) let toFetch = [CNContactGivenNameKey] as [CNKeyDescriptor] do { - let contacts = try store.unifiedContacts(matching: predicate, keysToFetch: toFetch) - guard contacts.count > 0 else { - callback2(true) // no contacts found - return + let contacts = try contactStore.unifiedContacts(matching: predicate, keysToFetch: toFetch) + guard !contacts.isEmpty else { + return true // no contacts found } + var success = true for contact in contacts { let req = CNSaveRequest() - let mutableContact = contact.mutableCopy() as! CNMutableContact - req.delete(mutableContact) - + let mutableContact = contact.mutableCopy() as? CNMutableContact + if let mutableContact { + req.delete(mutableContact) + } + do { - try store.execute(req) - callback2(true) // successfully deleted user + try contactStore.execute(req) } catch { - callback2(false) + success = false } } + return success } catch { - callback2(false) + return false + } + } + + func checkContactsExist(_ contacts: [Contact]) -> Bool { + if !doesHaveAccess() { + return false + } + + let toFetch = [CNContactGivenNameKey] as [CNKeyDescriptor] + + for contact in contacts { + let predicate = CNContact.predicateForContacts(matchingName: contact.contactName) + + do { + let contacts = try contactStore.unifiedContacts(matching: predicate, keysToFetch: toFetch) + if contacts.isEmpty { + return false // at least one contact does not exist + } + } catch { + return false // error occured during fetching + } } + return true } } diff --git a/PennMobile/Contacts/ContactModel.swift b/PennMobile/Contacts/ContactModel.swift new file mode 100644 index 000000000..100289163 --- /dev/null +++ b/PennMobile/Contacts/ContactModel.swift @@ -0,0 +1,51 @@ +// +// ContactModel.swift +// PennMobile +// +// Created by Jordan Hochman on 11/16/24. +// Copyright © 2024 PennLabs. All rights reserved. +// + +import Foundation + +struct Contact: Identifiable { + let name: String + let contactName: String + let phone: String + let description: String? + let phoneFiltered: String + + var id: String { name } + + init(name: String, contactName: String, phoneNumber: String, desc: String? = nil) { + self.name = name + self.phone = phoneNumber + self.contactName = contactName + self.description = desc + self.phoneFiltered = phoneNumber.filter { $0.isNumber } + } +} + +extension Contact { + static let pennGeneral = Contact(name: "Penn Police (Non-Emergency)", contactName: "Penn Police (Non-Emergency)", phoneNumber: "(215) 898-7297", desc: "Call for all non-emergencies.") + + static let pennEmergency = Contact(name: "Penn Police/MERT (Emergency)", contactName: "Penn Police/MERT (Emergency)", phoneNumber: "(215) 573-3333", desc: "Call for all criminal or medical emergencies.") + + static let pennWalk = Contact(name: "Penn Walk", contactName: "Penn Walk", phoneNumber: "215-898-WALK (9255)", desc: "Call for a walking escort between 30th and 43rd Streets and Market Street and Baltimore Avenue.") + + static let pennRide = Contact(name: "Penn Ride", contactName: "Penn Ride", phoneNumber: "215-898-RIDE (7433)", desc: "Call for Penn Ride services.") + + static let helpLine = Contact(name: "Help Line", contactName: "Penn Help Line", phoneNumber: "215-898-HELP (4357)", desc: "24-hour phone line for navigating Penn's health and wellness resources.") + + static let caps = Contact(name: "CAPS", contactName: "Penn CAPS", phoneNumber: "215-898-7021", desc: "Call anytime to reach Penn's Counseling and Psychological Services Center.") + + static let specialServices = Contact(name: "Special Services", contactName: "Penn Special Services", phoneNumber: "215-898-4481", desc: "Call to inquire or receive support services when victimized by any type of crime.") + + static let womensCenter = Contact(name: "Women's Center", contactName: "Penn Women's Center", phoneNumber: "215-898-8611", desc: "The Women's Center sponsors programs on career development, stress management, parenting, violence prevention, and more.") + + static let shs = Contact(name: "Student Health Services", contactName: "Penn Student Health Services", phoneNumber: "215-746-3535", desc: "Call to make an appointment, contact a department, or address urgent medical issues.") + + static let ofa = Contact(name: "Office of Affirmative Action", contactName: "Penn Office of Affirmative Action", phoneNumber: "(215) 898-6993", desc: "Call regarding issues related to the University's obligations as an aff. action and equal opp. employer and educational institution.") + + static let contacts = [pennEmergency, pennGeneral, pennWalk, pennRide, helpLine, caps, specialServices, womensCenter, shs, ofa] +} diff --git a/PennMobile/Contacts/ContactRowView.swift b/PennMobile/Contacts/ContactRowView.swift new file mode 100644 index 000000000..6b57743f2 --- /dev/null +++ b/PennMobile/Contacts/ContactRowView.swift @@ -0,0 +1,67 @@ +// +// ContactRowView.swift +// PennMobile +// +// Created by Jordan Hochman on 11/16/24. +// Copyright © 2024 PennLabs. All rights reserved. +// + +import SwiftUI + +struct ContactRowView: View { + let contact: Contact + @State var isExpanded = false + + var body: some View { + HStack { + Button(action: { + call(number: contact.phoneFiltered) + }) { + Image("phone") + .resizable() + .frame(width: 30, height: 30) + } + .buttonStyle(.plain) + + Button(action: { + withAnimation { + isExpanded.toggle() + } + }) { + HStack { + VStack(alignment: .leading) { + Text(contact.name) + + if isExpanded { + Text(contact.phone) + .font(.subheadline) + + if let desc = contact.description { + Text(desc) + .font(.subheadline) + } + } + } + + Spacer() + + Image(systemName: isExpanded ? "chevron.up" : "chevron.down") + .foregroundColor(.gray) + } + .contentShape(Rectangle()) + } + .buttonStyle(.plain) + } + } + + private func call(number: String) { + guard let url = URL(string: "tel://" + number) else { + return + } + UIApplication.shared.open(url) + } +} + +#Preview { + ContactRowView(contact: Contact.pennGeneral) +} diff --git a/PennMobile/Contacts/ContactsTableViewController.swift b/PennMobile/Contacts/ContactsTableViewController.swift deleted file mode 100755 index 0ed8dc44b..000000000 --- a/PennMobile/Contacts/ContactsTableViewController.swift +++ /dev/null @@ -1,165 +0,0 @@ -// -// SupportTableViewController2.swift -// PennMobile -// -// Created by Josh Doman on 8/12/17. -// Copyright © 2017 PennLabs. All rights reserved. -// - -import UIKit - -protocol ContactCellDelegate: AnyObject { - func call(number: String) -} - -class ContactsTableViewController: GenericTableViewController, ShowsAlert { - - let contacts: [SupportItem] = SupportItem.getContacts() as! [SupportItem] - - fileprivate var expandedCellIndex: IndexPath? - - fileprivate var contactsButtonTitle: String { - get { - return UserDefaults.standard.bool(forKey: "Contacts added") ? "Remove all" : "Add all" - } - } - - fileprivate lazy var addRemoveButton: UIBarButtonItem = { - return UIBarButtonItem(title: self.contactsButtonTitle, style: .done, target: self, action: #selector(addRemove(_:))) - }() - - fileprivate let cellId = "supportCellId" - - override func viewDidLoad() { - super.viewDidLoad() - navigationItem.rightBarButtonItem = addRemoveButton - self.title = "Contacts" - - tableView.dataSource = self - tableView.delegate = self - tableView.register(ContactCell.self, forCellReuseIdentifier: cellId) - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - self.tabBarController?.title = "Contacts" - } -} - -// MARK: - TableView Datasource -extension ContactsTableViewController { - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return contacts.count - } - - override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - if indexPath == expandedCellIndex { - return 100.0 - } - return 60.0 - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) as! ContactCell - cell.contact = contacts[indexPath.row] - cell.delegate = self - return cell - } - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - tableView.deselectRow(at: indexPath, animated: true) - - var indexes = [indexPath] - - if let expandedIndex = expandedCellIndex, indexPath != expandedCellIndex { - let expandedCell = tableView.cellForRow(at: expandedIndex) as! ContactCell - expandedCell.isExpanded = false - indexes.append(expandedIndex) - } - - expandedCellIndex = indexPath == expandedCellIndex ? nil : indexPath - - let cell = tableView.cellForRow(at: indexPath) as! ContactCell - cell.isExpanded = expandedCellIndex != nil - - tableView.beginUpdates() - tableView.endUpdates() - } - - private func expandCell(cell: ContactCell, indexPath: IndexPath, expand: Bool) { - cell.isExpanded = expand - tableView.reloadRows(at: [indexPath], with: .automatic) - } -} - -// MARK: - add/remove UI button logic -extension ContactsTableViewController { - @objc fileprivate func addRemove(_ sender: UIBarButtonItem) { - if UserDefaults.standard.bool(forKey: "Contacts added") { - removeContacts() - } else { - addContacts() - } - } - - fileprivate func updateAddRemoveButton() { - self.addRemoveButton.tintColor = .clear - addRemoveButton.title = contactsButtonTitle - self.addRemoveButton.tintColor = nil - } -} - -// MARK: - ContactManager logic -extension ContactsTableViewController { - fileprivate func addContacts() { - ContactManager.shared.save(contacts) { (success) in - self.contactManagerFinished(success, isAddingContacts: true) - } - } - - fileprivate func removeContacts() { - ContactManager.shared.delete(contacts) { (success) in - self.contactManagerFinished(success, isAddingContacts: false) - } - } - - fileprivate func contactManagerFinished(_ success: Bool, isAddingContacts: Bool) { - let msg = success ? "All Penn contacts have been \(isAddingContacts ? "saved to" : "removed from") your address book." : "Please try again. You must permit access to your contact book." - let title = success ? (isAddingContacts ? "Saved" : "Removed"): "Uh oh!" - let alertController = UIAlertController(title: title, message: msg, preferredStyle: .alert) - - if success { - UserDefaults.standard.set(!UserDefaults.standard.bool(forKey: "Contacts added"), forKey: "Contacts added") - alertController.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) in - self.updateAddRemoveButton() - })) - } else { - alertController.addAction(UIAlertAction(title: "Cancel", style: .default, handler: { (_) in - self.updateAddRemoveButton() - })) - - alertController.addAction(UIAlertAction(title: "Settings", style: .default, handler: { (_) in - guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { - return - } - - if UIApplication.shared.canOpenURL(settingsUrl) { - UIApplication.shared.open(settingsUrl, completionHandler: { (successful) in - if successful { - self.updateAddRemoveButton() - } - }) - } - })) - } - self.present(alertController, animated: true, completion: nil) - } -} - -// MARK: ContactCellDelegate -extension ContactsTableViewController: ContactCellDelegate { - func call(number: String) { - guard let number = URL(string: "tel://" + number) else { return } - UIApplication.shared.open(number) - } -} diff --git a/PennMobile/Contacts/ContactsView.swift b/PennMobile/Contacts/ContactsView.swift new file mode 100644 index 000000000..15497a2ad --- /dev/null +++ b/PennMobile/Contacts/ContactsView.swift @@ -0,0 +1,82 @@ +// +// ContactsView.swift +// PennMobile +// +// Created by Jordan Hochman on 11/16/24. +// Copyright © 2024 PennLabs. All rights reserved. +// + +import SwiftUI + +struct ContactsView: View { + @State var contactsExist = false + @State var showAlert = false + @State var alertTitle = "" + @State var alertMessage = "" + @State var showSettings = false + + var body: some View { + ScrollView { + VStack(spacing: 10) { + Divider() + + ForEach(Contact.contacts) { contact in + ContactRowView(contact: contact) + + Divider() + } + } + } + .padding() + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Button(action: { + let success = contactsExist ? ContactManager.shared.deleteContacts(Contact.contacts) : ContactManager.shared.saveContacts(Contact.contacts) + if success { + contactsExist = ContactManager.shared.checkContactsExist(Contact.contacts) + } + let didAddContacts = contactsExist + + alertTitle = success ? (didAddContacts ? "Saved" : "Removed"): "Uh oh!" + alertMessage = success ? "All Penn contacts have been \(didAddContacts ? "saved to" : "removed from") your address book." : "Please try again. You must permit access to your contact book." + showSettings = !success + showAlert = true + }) { + Text(contactsExist ? "Remove contacts" : "Add contacts") + } + } + } + .alert(isPresented: $showAlert) { + showSettings ? + Alert( + title: Text(alertTitle), + message: Text(alertMessage), + primaryButton: .default(Text("Settings"), action: openSettings), + secondaryButton: .cancel() + ) : + Alert( + title: Text(alertTitle), + message: Text(alertMessage), + dismissButton: .default(Text("Ok")) + ) + } + .onAppear { + contactsExist = ContactManager.shared.checkContactsExist(Contact.contacts) + } + } + + private func openSettings() { + guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { + return + } + if UIApplication.shared.canOpenURL(settingsUrl) { + UIApplication.shared.open(settingsUrl) + } + } +} + +#Preview { + NavigationStack { + ContactsView() + } +} diff --git a/PennMobile/Contacts/SupportItem.h b/PennMobile/Contacts/SupportItem.h deleted file mode 100755 index 222e20e45..000000000 --- a/PennMobile/Contacts/SupportItem.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// SupportItem.h -// PennMobile -// -// Created by Sacha Best on 1/22/15. -// Copyright (c) 2015 PennLabs. All rights reserved. -// - -#import -#import - -@interface SupportItem : NSObject - -@property NSString *name; -@property NSString *contactName; -@property NSString *phone; -@property NSString *descriptionText; -@property UIImage *img; -@property NSString *phoneFiltered; - - --(id)initWithName:(NSString *)name - contactName:(NSString *)contactName - phone:(NSString*) phoneNumber - desc:(NSString*) desc; - -+(NSArray*) getContacts; - - -@end diff --git a/PennMobile/Contacts/SupportItem.m b/PennMobile/Contacts/SupportItem.m deleted file mode 100755 index 8fd24a28f..000000000 --- a/PennMobile/Contacts/SupportItem.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// SupportItem.m -// PennMobile -// -// Created by Sacha Best on 1/22/15. -// Copyright (c) 2015 PennLabs. All rights reserved. -// - -#import "SupportItem.h" - -@implementation SupportItem - --(id)initWithName:(NSString *)name - contactName:(NSString *)contactName - phone:(NSString *)phoneNumber - desc:(NSString *)desc{ - self = [super init]; - if(self) { - self.name = name; - self.phone = phoneNumber; - self.contactName = contactName; - self.phoneFiltered = [phoneNumber stringByReplacingOccurrencesOfString:@"-" withString:@""]; - self.phoneFiltered = [self.phoneFiltered stringByReplacingOccurrencesOfString:@" " withString:@""]; - self.phoneFiltered = [self.phoneFiltered stringByReplacingOccurrencesOfString:@"(" withString:@""]; - self.phoneFiltered = [self.phoneFiltered stringByReplacingOccurrencesOfString:@")" withString:@""]; - self.descriptionText = desc; - } - return self; -} - -+(NSArray*) getContacts -{ - SupportItem *pGeneral = - [[SupportItem alloc] initWithName:@"Penn Police (Non-Emergency)" - contactName:@"Penn Police (Non-Emergency)" - phone:@"(215) 898-7297" - desc:@"Call for all non-emergencies."]; - - SupportItem *pEmergency = - [[SupportItem alloc] initWithName:@"Penn Police/MERT (Emergency)" - contactName:@"Penn Police/MERT (Emergency)" - phone:@"(215) 573-3333" - desc:@"Call for all criminal or medical emergencies."]; - - SupportItem *pWalk = - [[SupportItem alloc] initWithName:@"Penn Walk" - contactName:@"Penn Walk" - phone:@"215-898-WALK (9255)" - desc:@"Call for a walking escort between 30th and 43rd Streets and Market Street and Baltimore Avenue."]; - pWalk.phoneFiltered = @"2158989255"; - - SupportItem *pRide = - [[SupportItem alloc] initWithName:@"Penn Ride" - contactName:@"Penn Ride" - phone:@"215-898-RIDE (7433)" - desc:@"Call for Penn Ride services."]; - pRide.phoneFiltered = @"2158987433"; - - SupportItem *hLine = - [[SupportItem alloc] initWithName:@"Help Line" - contactName:@"Penn Help Line" - phone:@"215-898-HELP (4357)" - desc:@"24-hour phone line for navigating Penn’s health and wellness resources."]; - hLine.phoneFiltered = @"2158984357"; - - SupportItem *caps = - [[SupportItem alloc] initWithName:@"CAPS" - contactName:@"Penn CAPS" - phone:@"215-898-7021" - desc:@"Call anytime to reach Penn's Counseling and Pyschological Services Center."]; - - SupportItem *special = - [[SupportItem alloc] initWithName:@"Special Services" - contactName:@"Penn Special Services" - phone:@"215-898-4481" - desc:@"Call to inquire or receive support services when victimized by any type of crime."]; - - SupportItem *womens = - [[SupportItem alloc] initWithName:@"Women's Center" - contactName:@"Penn Women's Center" - phone:@"215-898-8611" - desc:@"The Women's Center sponsors programs on career development, stress management, parenting, violence prevention, and more."]; - - SupportItem *shs = - [[SupportItem alloc] initWithName:@"Student Health Services" - contactName:@"Penn Student Health Services" - phone:@"215-746-3535" - desc:@"Call to make an appointment, contact a department, or address urgent medical issues."]; - - SupportItem *ofa = - [[SupportItem alloc] initWithName:@"Office of Affirmative Action" - contactName:@"Penn Office of Affirmative Action" - phone:@"(215) 898-6993" - desc:@"Call regarding issues related to the University's obligations as an aff. action and equal opp. employer and educational institution."]; - - return [NSArray arrayWithObjects: - pEmergency, pGeneral, pWalk, ofa, hLine, caps, special, womens, shs, pRide, nil]; -} - -@end diff --git a/PennMobile/Course Alerts/Controllers/CourseAlertController.swift b/PennMobile/Course Alerts/Controllers/CourseAlertController.swift index 5a354cb3e..3d30fa183 100644 --- a/PennMobile/Course Alerts/Controllers/CourseAlertController.swift +++ b/PennMobile/Course Alerts/Controllers/CourseAlertController.swift @@ -5,7 +5,9 @@ // Created by Raunaq Singh on 10/25/20 // Copyright © 2020 PennLabs. All rights reserved. // + import Foundation +import UIKit class CourseAlertController: GenericViewController, ShowsAlertForError, IndicatorEnabled { diff --git a/PennMobile/Course Alerts/Views/CourseAlertCreateCell.swift b/PennMobile/Course Alerts/Views/CourseAlertCreateCell.swift index eeb424951..bf6c3a3bd 100644 --- a/PennMobile/Course Alerts/Views/CourseAlertCreateCell.swift +++ b/PennMobile/Course Alerts/Views/CourseAlertCreateCell.swift @@ -5,7 +5,9 @@ // Created by Raunaq Singh on 11/8/20. // Copyright © 2020 PennLabs. All rights reserved. // + import Foundation +import UIKit class CourseAlertCreateCell: UITableViewCell { diff --git a/PennMobile/Course Alerts/Views/ZeroCourseAlertsCell.swift b/PennMobile/Course Alerts/Views/ZeroCourseAlertsCell.swift index 579690f80..0541dba2d 100644 --- a/PennMobile/Course Alerts/Views/ZeroCourseAlertsCell.swift +++ b/PennMobile/Course Alerts/Views/ZeroCourseAlertsCell.swift @@ -5,7 +5,9 @@ // Created by Raunaq Singh on 11/8/20. // Copyright © 2020 PennLabs. All rights reserved. // + import Foundation +import UIKit class ZeroCourseAlertsCell: UITableViewCell { diff --git a/PennMobile/Fitness/FitnessViewController.swift b/PennMobile/Fitness/FitnessViewController.swift deleted file mode 100644 index 9aad8c409..000000000 --- a/PennMobile/Fitness/FitnessViewController.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// FitnessViewController.swift -// PennMobile -// -// Created by Jordan H on 4/7/23. -// Copyright © 2023 PennLabs. All rights reserved. -// - -import SwiftUI - -class FitnessViewController: GenericViewController { - - override func viewDidLoad() { - super.viewDidLoad() - - let hostingView = UIHostingController(rootView: FitnessView()) - - view.backgroundColor = .uiBackground - self.screenName = "Fitness" - self.title = "Fitness" - - addChild(hostingView) - view.addSubview(hostingView.view) - hostingView.didMove(toParent: self) - - hostingView.view.translatesAutoresizingMaskIntoConstraints = false - hostingView.view.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor).isActive = true - hostingView.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true - hostingView.view.leadingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.leadingAnchor).isActive = true - hostingView.view.trailingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.trailingAnchor).isActive = true - - } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - self.tabBarController?.title = "Fitness" - } -} diff --git a/PennMobile/GSR-Booking/Controllers/GSRBookable.swift b/PennMobile/GSR-Booking/Controllers/GSRBookable.swift index dad666355..3ab838ed3 100755 --- a/PennMobile/GSR-Booking/Controllers/GSRBookable.swift +++ b/PennMobile/GSR-Booking/Controllers/GSRBookable.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol GSRBookable: IndicatorEnabled, ShowsAlert {} diff --git a/PennMobile/GSR-Booking/Controllers/GSRDeletable.swift b/PennMobile/GSR-Booking/Controllers/GSRDeletable.swift index 73f478341..77149a51c 100755 --- a/PennMobile/GSR-Booking/Controllers/GSRDeletable.swift +++ b/PennMobile/GSR-Booking/Controllers/GSRDeletable.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol GSRDeletable: IndicatorEnabled, ShowsAlert {} diff --git a/PennMobile/GSR-Booking/Controllers/GSRGroups/GSRGroupController.swift b/PennMobile/GSR-Booking/Controllers/GSRGroups/GSRGroupController.swift index ca9ca513a..36bbf753b 100755 --- a/PennMobile/GSR-Booking/Controllers/GSRGroups/GSRGroupController.swift +++ b/PennMobile/GSR-Booking/Controllers/GSRGroups/GSRGroupController.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit // group gsrs! class GSRGroupController: GenericViewController { diff --git a/PennMobile/GSR-Booking/Controllers/GSRLocationsController.swift b/PennMobile/GSR-Booking/Controllers/GSRLocationsController.swift index 6b3459cf3..6f4614c82 100755 --- a/PennMobile/GSR-Booking/Controllers/GSRLocationsController.swift +++ b/PennMobile/GSR-Booking/Controllers/GSRLocationsController.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit class GSRLocationsController: GenericViewController { diff --git a/PennMobile/GSR-Booking/Controllers/GSRTabController.swift b/PennMobile/GSR-Booking/Controllers/GSRTabController.swift index 9bc0b77e5..23b22618f 100755 --- a/PennMobile/GSR-Booking/Controllers/GSRTabController.swift +++ b/PennMobile/GSR-Booking/Controllers/GSRTabController.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import XLPagerTabStrip class GSRTabController: ButtonBarPagerTabStripViewController, LegacyToastPresentingViewController { diff --git a/PennMobile/GSR-Booking/Model/GSRGroup.swift b/PennMobile/GSR-Booking/Model/GSRGroup.swift index cce050679..a5ca59fc8 100755 --- a/PennMobile/GSR-Booking/Model/GSRGroup.swift +++ b/PennMobile/GSR-Booking/Model/GSRGroup.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit struct GSRGroup: Decodable, Comparable { let id: Int diff --git a/PennMobile/GSR-Booking/ViewModel/GSRManageGroupViewModel.swift b/PennMobile/GSR-Booking/ViewModel/GSRManageGroupViewModel.swift index 2dde23389..f2e48911b 100755 --- a/PennMobile/GSR-Booking/ViewModel/GSRManageGroupViewModel.swift +++ b/PennMobile/GSR-Booking/ViewModel/GSRManageGroupViewModel.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol GSRManageGroupViewModelDelegate { func beginBooking() diff --git a/PennMobile/GSR-Booking/ViewModel/GSRViewModel.swift b/PennMobile/GSR-Booking/ViewModel/GSRViewModel.swift index ce65833ee..d4ba2d111 100755 --- a/PennMobile/GSR-Booking/ViewModel/GSRViewModel.swift +++ b/PennMobile/GSR-Booking/ViewModel/GSRViewModel.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit enum SelectionType { case remove, add diff --git a/PennMobile/GSR-Booking/Views/GSRGroups/CreateGroupCell.swift b/PennMobile/GSR-Booking/Views/GSRGroups/CreateGroupCell.swift index f04dda0f8..070c57c4f 100755 --- a/PennMobile/GSR-Booking/Views/GSRGroups/CreateGroupCell.swift +++ b/PennMobile/GSR-Booking/Views/GSRGroups/CreateGroupCell.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit class CreateGroupCell: UITableViewCell { diff --git a/PennMobile/GSR-Booking/Views/GSRGroups/GroupCell.swift b/PennMobile/GSR-Booking/Views/GSRGroups/GroupCell.swift index 2c398340c..b52eee25e 100755 --- a/PennMobile/GSR-Booking/Views/GSRGroups/GroupCell.swift +++ b/PennMobile/GSR-Booking/Views/GSRGroups/GroupCell.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit class GroupCell: UITableViewCell { diff --git a/PennMobile/GSR-Booking/Views/NoReservationsCell.swift b/PennMobile/GSR-Booking/Views/NoReservationsCell.swift index 0ae69cc47..f0b3c7c16 100755 --- a/PennMobile/GSR-Booking/Views/NoReservationsCell.swift +++ b/PennMobile/GSR-Booking/Views/NoReservationsCell.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit class NoReservationsCell: UITableViewCell { diff --git a/PennMobile/General/ModularTableView/ModularTableView.swift b/PennMobile/General/ModularTableView/ModularTableView.swift index 3488c9db5..9717e8ac1 100755 --- a/PennMobile/General/ModularTableView/ModularTableView.swift +++ b/PennMobile/General/ModularTableView/ModularTableView.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit final class ModularTableView: UITableView { var model: ModularTableViewModel! { diff --git a/PennMobile/General/ModularTableView/ModularTableViewItemTypes.swift b/PennMobile/General/ModularTableView/ModularTableViewItemTypes.swift index 60f196f7e..1d0818999 100755 --- a/PennMobile/General/ModularTableView/ModularTableViewItemTypes.swift +++ b/PennMobile/General/ModularTableView/ModularTableViewItemTypes.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol ModularTableViewItemTypes: AnyObject { func registerCells(for tableView: UITableView) diff --git a/PennMobile/General/ModularTableView/ModularTableViewModel.swift b/PennMobile/General/ModularTableView/ModularTableViewModel.swift index 41a36565f..0afef8d0a 100755 --- a/PennMobile/General/ModularTableView/ModularTableViewModel.swift +++ b/PennMobile/General/ModularTableView/ModularTableViewModel.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol ModularTableViewModelDelegate: ModularTableViewCellDelegate {} diff --git a/PennMobile/General/Networking + Analytics/ImageNetworkingManager.swift b/PennMobile/General/Networking + Analytics/ImageNetworkingManager.swift index 2ffbd3387..544ae2ed0 100755 --- a/PennMobile/General/Networking + Analytics/ImageNetworkingManager.swift +++ b/PennMobile/General/Networking + Analytics/ImageNetworkingManager.swift @@ -6,6 +6,7 @@ // Copyright © 2018 PennLabs. All rights reserved. // import Foundation +import UIKit import Kingfisher class ImageNetworkingManager { diff --git a/PennMobile/General/Networking + Analytics/Networking.swift b/PennMobile/General/Networking + Analytics/Networking.swift index 25b4cf486..d8597f57c 100755 --- a/PennMobile/General/Networking + Analytics/Networking.swift +++ b/PennMobile/General/Networking + Analytics/Networking.swift @@ -6,6 +6,8 @@ // Copyright © 2017 PennLabs. All rights reserved. // +import UIKit + public enum Method { case delete case get diff --git a/PennMobile/General/Protocols.swift b/PennMobile/General/Protocols.swift index 5bec8d368..257a162dd 100755 --- a/PennMobile/General/Protocols.swift +++ b/PennMobile/General/Protocols.swift @@ -6,6 +6,7 @@ // Copyright © 2017 PennLabs. All rights reserved. // +import UIKit import CoreLocation import LocalAuthentication import PennMobileShared diff --git a/PennMobile/Home/Cells/Feature/HomeFeatureCell.swift b/PennMobile/Home/Cells/Feature/HomeFeatureCell.swift index fc324cc76..3ab17f8da 100755 --- a/PennMobile/Home/Cells/Feature/HomeFeatureCell.swift +++ b/PennMobile/Home/Cells/Feature/HomeFeatureCell.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit final class HomeFeatureCell: UITableViewCell, HomeCellConformable { static var identifier: String = "homeFeatureCell" diff --git a/PennMobile/Home/Cells/Feature/HomeFeatureCellItem.swift b/PennMobile/Home/Cells/Feature/HomeFeatureCellItem.swift index 678cb1d70..4237a1f6a 100755 --- a/PennMobile/Home/Cells/Feature/HomeFeatureCellItem.swift +++ b/PennMobile/Home/Cells/Feature/HomeFeatureCellItem.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import SwiftyJSON final class HomeFeatureCellItem: HomeCellItem { diff --git a/PennMobile/Home/Cells/GSR/HomeGSRBookingButton.swift b/PennMobile/Home/Cells/GSR/HomeGSRBookingButton.swift index 6f4e8e617..6266d3097 100755 --- a/PennMobile/Home/Cells/GSR/HomeGSRBookingButton.swift +++ b/PennMobile/Home/Cells/GSR/HomeGSRBookingButton.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol HomeGSRBookingButtonDelegate { func handleBookingSelected(_ booking: GSRBooking) diff --git a/PennMobile/Home/Cells/Group Invites/HomeGroupInvitesCell.swift b/PennMobile/Home/Cells/Group Invites/HomeGroupInvitesCell.swift index aa6012b8d..85a19d60e 100755 --- a/PennMobile/Home/Cells/Group Invites/HomeGroupInvitesCell.swift +++ b/PennMobile/Home/Cells/Group Invites/HomeGroupInvitesCell.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import PennMobileShared protocol GSRInviteSelectable { diff --git a/PennMobile/Home/Cells/HomeCellConformable.swift b/PennMobile/Home/Cells/HomeCellConformable.swift index b028ff0e0..f9870355e 100755 --- a/PennMobile/Home/Cells/HomeCellConformable.swift +++ b/PennMobile/Home/Cells/HomeCellConformable.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit protocol HomeCellDelegate: ModularTableViewCellDelegate, LaundryMachineCellTappable, diff --git a/PennMobile/Home/Cells/News/HomeNewsCell.swift b/PennMobile/Home/Cells/News/HomeNewsCell.swift index 54f4dfca5..87d230bf4 100755 --- a/PennMobile/Home/Cells/News/HomeNewsCell.swift +++ b/PennMobile/Home/Cells/News/HomeNewsCell.swift @@ -6,6 +6,7 @@ // Copyright © 2019 PennLabs. All rights reserved. // +import UIKit import Foundation import SwiftSoup import PennMobileShared diff --git a/PennMobile/Home/Cells/Post/HomePostCell.swift b/PennMobile/Home/Cells/Post/HomePostCell.swift index 90ed4d20b..bfab0498d 100755 --- a/PennMobile/Home/Cells/Post/HomePostCell.swift +++ b/PennMobile/Home/Cells/Post/HomePostCell.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import Kingfisher import PennMobileShared diff --git a/PennMobile/Laundry/Cells/LaundryCell + Graph.swift b/PennMobile/Laundry/Cells/LaundryCell + Graph.swift index 9e7ca8ec6..8d20d05c4 100755 --- a/PennMobile/Laundry/Cells/LaundryCell + Graph.swift +++ b/PennMobile/Laundry/Cells/LaundryCell + Graph.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import ScrollableGraphView // MARK: - Scrollable Graph View diff --git a/PennMobile/Laundry/Cells/LaundryGraphView.swift b/PennMobile/Laundry/Cells/LaundryGraphView.swift index c7c7a6d12..e3eb3c869 100755 --- a/PennMobile/Laundry/Cells/LaundryGraphView.swift +++ b/PennMobile/Laundry/Cells/LaundryGraphView.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import ScrollableGraphView final class LaundryGraphView: UIView { diff --git a/PennMobile/Laundry/Cells/LaundryMachinesView.swift b/PennMobile/Laundry/Cells/LaundryMachinesView.swift index 8787d5954..6b1f3c5ba 100755 --- a/PennMobile/Laundry/Cells/LaundryMachinesView.swift +++ b/PennMobile/Laundry/Cells/LaundryMachinesView.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import PennMobileShared protocol LaundryMachinesViewDataSource { diff --git a/PennMobile/Laundry/Controllers/LaundryMachineCellTappable.swift b/PennMobile/Laundry/Controllers/LaundryMachineCellTappable.swift index 6f16e1fe2..983dc6980 100755 --- a/PennMobile/Laundry/Controllers/LaundryMachineCellTappable.swift +++ b/PennMobile/Laundry/Controllers/LaundryMachineCellTappable.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import PennMobileShared protocol LaundryMachineCellTappable: NotificationRequestable { diff --git a/PennMobile/Laundry/Model/LaundryRoom.swift b/PennMobile/Laundry/Model/LaundryRoom.swift index 6e697bde2..81420acd4 100755 --- a/PennMobile/Laundry/Model/LaundryRoom.swift +++ b/PennMobile/Laundry/Model/LaundryRoom.swift @@ -5,7 +5,9 @@ // Created by Zhilei Zheng on 2017/10/24. // Copyright © 2017年 Zhilei Zheng. All rights reserved. // + import Foundation +import UIKit import SwiftyJSON import PennMobileShared diff --git a/PennMobile/Laundry/Views/RoomSelectionView.swift b/PennMobile/Laundry/Views/RoomSelectionView.swift index 0ee7f63be..104debcde 100755 --- a/PennMobile/Laundry/Views/RoomSelectionView.swift +++ b/PennMobile/Laundry/Views/RoomSelectionView.swift @@ -6,6 +6,8 @@ // Copyright © 2017 PennLabs. All rights reserved. // +import UIKit + protocol RoomSelectionViewDelegate: AnyObject { func updateSelectedRooms(for rooms: [LaundryRoom]) func handleFailureToLoadDictionary() diff --git a/PennMobile/More Tab/AboutViewController.swift b/PennMobile/More Tab/AboutViewController.swift index c6c0ade5d..b9bf0e796 100644 --- a/PennMobile/More Tab/AboutViewController.swift +++ b/PennMobile/More Tab/AboutViewController.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import PennMobileShared class AboutViewController: UIViewController { diff --git a/PennMobile/More Tab/PAC Code/PacCodeViewController.swift b/PennMobile/More Tab/PAC Code/PacCodeViewController.swift index 93c0a92bb..7918f7bf4 100755 --- a/PennMobile/More Tab/PAC Code/PacCodeViewController.swift +++ b/PennMobile/More Tab/PAC Code/PacCodeViewController.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import PennMobileShared class PacCodeViewController: UIViewController, ShowsAlertForError, IndicatorEnabled { diff --git a/PennMobile/Notifications/NotificationRequestable.swift b/PennMobile/Notifications/NotificationRequestable.swift index 22a0f77b2..eff282367 100755 --- a/PennMobile/Notifications/NotificationRequestable.swift +++ b/PennMobile/Notifications/NotificationRequestable.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import UserNotifications import SCLAlertView diff --git a/PennMobile/Notifications/NotificationsTableViewController.swift b/PennMobile/Notifications/NotificationsTableViewController.swift index 2274ec4ae..903669405 100755 --- a/PennMobile/Notifications/NotificationsTableViewController.swift +++ b/PennMobile/Notifications/NotificationsTableViewController.swift @@ -6,6 +6,7 @@ // Copyright © 2019 PennLabs. All rights reserved. // +import Foundation import UIKit protocol NotificationViewControllerChangedPreference: AnyObject { diff --git a/PennMobile/Polls/PollsNetworkManager.swift b/PennMobile/Polls/PollsNetworkManager.swift index a0de5aa07..8032a79cc 100644 --- a/PennMobile/Polls/PollsNetworkManager.swift +++ b/PennMobile/Polls/PollsNetworkManager.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import SwiftyJSON import PennMobileShared diff --git a/PennMobile/Setup + Navigation/AppDelegate+NotificationExtension.swift b/PennMobile/Setup + Navigation/AppDelegate+NotificationExtension.swift index 92f8940a8..f5fd63e3e 100755 --- a/PennMobile/Setup + Navigation/AppDelegate+NotificationExtension.swift +++ b/PennMobile/Setup + Navigation/AppDelegate+NotificationExtension.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit import SwiftyJSON extension AppDelegate: UNUserNotificationCenterDelegate { diff --git a/PennMobile/Setup + Navigation/ControllerModel.swift b/PennMobile/Setup + Navigation/ControllerModel.swift index 8d404d10b..a7a827b5d 100755 --- a/PennMobile/Setup + Navigation/ControllerModel.swift +++ b/PennMobile/Setup + Navigation/ControllerModel.swift @@ -58,7 +58,6 @@ class ControllerModel: NSObject { vcDictionary[.more] = MoreViewController() vcDictionary[.map] = MapViewController() vcDictionary[.news] = NewsViewController() - vcDictionary[.contacts] = ContactsTableViewController() vcDictionary[.about] = AboutViewController() vcDictionary[.notifications] = NotificationsViewControllerSwiftUI() vcDictionary[.preferences] = PreferencesViewController() @@ -67,8 +66,6 @@ class ControllerModel: NSObject { vcDictionary[.pacCode] = PacCodeViewController() vcDictionary[.courseAlerts] = CourseAlertController() vcDictionary[.headlineNews] = NativeNewsViewController() - vcDictionary[.fitness] = FitnessViewController() - // vcDictionary[.fling] = FlingViewController() } var viewControllers: [UIViewController] { diff --git a/PennMobile/Setup + Navigation/Features.swift b/PennMobile/Setup + Navigation/Features.swift index 84ef79945..82b5cb5c1 100644 --- a/PennMobile/Setup + Navigation/Features.swift +++ b/PennMobile/Setup + Navigation/Features.swift @@ -101,7 +101,10 @@ let features: [AppFeature] = [ AppFeature(.gsr, shortName: "GSR", longName: "GSR Booking", color: .baseGreen, image: .app("GSR_Grey"), controller: GSRTabController.self), AppFeature(.laundry, name: "Laundry", color: .baseBlue, image: .app("Laundry_Grey"), controller: LaundryTableViewController.self), AppFeature(.news, name: "News", color: .baseRed, image: .app("News_Grey"), controller: NewsViewController.self), - AppFeature(.contacts, shortName: "Contacts", longName: "Penn Contacts", color: .baseYellow, image: .app("Contacts_Grey"), controller: ContactsTableViewController.self), + AppFeature(.contacts, shortName: "Contacts", longName: "Penn Contacts", color: .baseYellow, image: .app("Contacts_Grey")) { + ContactsView() + .navigationTitle(Text("Contacts")) + }, AppFeature(.courseSchedule, shortName: "Courses", longName: "Course Schedule", color: .basePurple, image: .app("Calendar_Grey")) { CoursesView().environmentObject(CoursesViewModel.shared) }, diff --git a/PennMobile/Setup + Navigation/TabBarController.swift b/PennMobile/Setup + Navigation/TabBarController.swift index c8c5fc4cb..5b9db0f50 100755 --- a/PennMobile/Setup + Navigation/TabBarController.swift +++ b/PennMobile/Setup + Navigation/TabBarController.swift @@ -58,14 +58,6 @@ extension HomeViewController: TabBarShowable { } } -/*extension FlingViewController: TabBarShowable { - func getTabBarItem() -> UITabBarItem { - let normalImage = UIImage(named: "Fling_Grey") - let selectedImage = UIImage(named: "Fling_Blue") - return UITabBarItem(title: "Fling", image: normalImage, selectedImage: selectedImage) - } -}*/ - extension DiningViewControllerSwiftUI: TabBarShowable { func getTabBarItem() -> UITabBarItem { let normalImage = UIImage(named: "Dining_Grey") @@ -106,14 +98,6 @@ extension LaundryTableViewController: TabBarShowable { } } -extension ContactsTableViewController: TabBarShowable { - func getTabBarItem() -> UITabBarItem { - let normalImage = UIImage(named: "Contacts_Grey") - let selectedImage = UIImage(named: "Contacts_Blue") - return UITabBarItem(title: "Contacts", image: normalImage, selectedImage: selectedImage) - } -} - extension CoursesViewController: TabBarShowable { func getTabBarItem() -> UITabBarItem { let normalImage = UIImage(named: "Calendar_Grey") @@ -130,14 +114,6 @@ extension NewsViewController: TabBarShowable { } } -extension FitnessViewController: TabBarShowable { - func getTabBarItem() -> UITabBarItem { - let normalImage = UIImage(named: "Fitness_Grey") - let selectedImage = UIImage(named: "Fitness_Blue") - return UITabBarItem(title: "Fitness", image: normalImage, selectedImage: selectedImage) - } -} - extension MoreViewController: TabBarShowable { func getTabBarItem() -> UITabBarItem { let normalImage = UIImage(named: "More_Grey") diff --git a/PennMobile/Subletting/SublettingAPI.swift b/PennMobile/Subletting/SublettingAPI.swift index 829b377ba..f713ada74 100644 --- a/PennMobile/Subletting/SublettingAPI.swift +++ b/PennMobile/Subletting/SublettingAPI.swift @@ -6,6 +6,7 @@ // Copyright © 2024 PennLabs. All rights reserved. // +import UIKit import PennMobileShared struct GenericErrorResponse: Decodable { diff --git a/PennMobile/Supporting_Files/PennMobile-Bridging-Header.h b/PennMobile/Supporting_Files/PennMobile-Bridging-Header.h deleted file mode 100755 index 7e9896e72..000000000 --- a/PennMobile/Supporting_Files/PennMobile-Bridging-Header.h +++ /dev/null @@ -1,5 +0,0 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// - -#import "SupportItem.h" diff --git a/PennMobile/Supporting_Files/PrefixHeader.pch b/PennMobile/Supporting_Files/PrefixHeader.pch deleted file mode 100755 index e61bf9d7e..000000000 --- a/PennMobile/Supporting_Files/PrefixHeader.pch +++ /dev/null @@ -1,19 +0,0 @@ -// -// PrefixHeader.pch -// PennMobile -// -// Created by Sacha Best on 9/25/14. -// Copyright (c) 2014 PennLabs. All rights reserved. -// - -#ifndef PennMobile_PrefixHeader_pch -#define PennMobile_PrefixHeader_pch - -// Include any system framework and library headers here that should be included in all compilation units. -// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. - -#define SERVER_ROOT @"http://api.pennlabs.org/" - -#define PENN_YELLOW [UIColor colorWithRed:192.0/255.0f green:57.0/255.0f blue:43.0/255.0f alpha:1.0f] - -#endif