Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Bring main up to date (#521)
Browse files Browse the repository at this point in the history
* Fix/widget and movie bugs (#511)

* change tabbar items of Widgets & Grades to "outline"

* change studyroom widget icon

* bugfix: show events on same day -> filter past events out before building dict

* Improve MovieCard Design

* Update Version Number

* Make Widgets only available on phone

* Fix/token permissions UI (#512)

* Adding a new warning if not all permissions are granted.

* Spacers and Localizables

* bugfix: fix tower image (#509)

Closes #508

* Design/login (#513)

* Move Calendar Picker to bottom

* Rename Widget Tabbaritem

* Make LecturesView icons outline

* LectureView: reduce Lecture Info Text sizes

* Remove Calendar EventsView

* Fix Movie Title Image gray bar

* - fix TUM logo white pixelation
- calendar picker back to top

* Redesign some stuff for the Login Process

* Remove old tum logo_white images

* A few Login Design changes

* Add Need Help Button to Check Permissions View

* Remove red x from Check Token Button

* Add personal NavigationTitle to Widget View

* Today Btn press in Calendar forwards to day view

* Adjust Login Design to iPad

* Localize Mensa Garching traffic

* Remove icon from Semester List Group Header on Grades & Lectures

* Adjust Grades Info Design to Lectures (-> icon outline, text larger)

* LectureDetails: Add contact btn to lecturer info

* Change Lecturer Search Icon

* Widget View: await name to display navigationTitle

* Add Spacer to Widget Detail sheet top

* Change color check token permission view text

* Open Widget View when logging in

* Generate personalized Widget Navigation Title

* Reorder Code Widget Screen

* Adjust Profile "GET IN CONTACT" Btns to Webview setting

* Move NavTitle loading into recommender loading

* remove request location always use

* A few Login - Token Design changes

* Add compiler directive that disables Crashlytics for development (#520)

* Simple Crashlytics Service (#522)

* implemented simple `CrashlyticsService`

* replaced existing crashlytics usage

---------

Co-authored-by: August Wittgenstein <[email protected]>
Co-authored-by: August Wittgenstein <[email protected]>
Co-authored-by: 14slash12 <[email protected]>
Co-authored-by: Thomas Schuster <[email protected]>
Co-authored-by: Anton Wyrowski <[email protected]>
  • Loading branch information
6 people authored Feb 1, 2023
1 parent ed182bd commit ba97243
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 6 deletions.
12 changes: 12 additions & 0 deletions Campus-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
97997AE7277234120079F809 /* XMLCoder in Frameworks */ = {isa = PBXBuildFile; productRef = 97997AE6277234120079F809 /* XMLCoder */; };
97C9AB1227732A200097B10C /* SwiftUICharts in Frameworks */ = {isa = PBXBuildFile; productRef = 97C9AB1127732A200097B10C /* SwiftUICharts */; };
97F8A79327E641570099EE83 /* AcademicDegree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97F8A79227E641570099EE83 /* AcademicDegree.swift */; };
99706870298569E10028D235 /* CrashlyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9970686F298569E10028D235 /* CrashlyticsService.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -517,6 +518,7 @@
97270F5927AB2A4900BB25E4 /* Array+Rearrange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+Rearrange.swift"; sourceTree = "<group>"; };
974D5B9927E5E9CB00FD7B11 /* GlowBorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlowBorder.swift; sourceTree = "<group>"; };
97F8A79227E641570099EE83 /* AcademicDegree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcademicDegree.swift; sourceTree = "<group>"; };
9970686F298569E10028D235 /* CrashlyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashlyticsService.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -1083,6 +1085,7 @@
366F0E8227580CFB0091651D /* Campus-iOS */ = {
isa = PBXGroup;
children = (
9970686E298569CE0028D235 /* Crashlytics */,
085DE9C428AB7C3D0045095F /* AnalyticsComponent */,
3654F3692851710E008AD5DC /* RoomFinder */,
36BB6F8027B39B2200F224AB /* LectureSearchComponent */,
Expand Down Expand Up @@ -1514,6 +1517,14 @@
path = Icons;
sourceTree = "<group>";
};
9970686E298569CE0028D235 /* Crashlytics */ = {
isa = PBXGroup;
children = (
9970686F298569E10028D235 /* CrashlyticsService.swift */,
);
path = Crashlytics;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -1843,6 +1854,7 @@
3654F38A28518640008AD5DC /* StudyRoomDetailsView.swift in Sources */,
36AF61ED27A2FD7800FEBD98 /* FailedView.swift in Sources */,
36108BBE27A3046B007DC62D /* LecturesService.swift in Sources */,
99706870298569E10028D235 /* CrashlyticsService.swift in Sources */,
36108BF027A304B6007DC62D /* PanelContentView.swift in Sources */,
36AF61F127A2FD7800FEBD98 /* XMLSerializer.swift in Sources */,
08FAFD1A288DED6F006A0E27 /* WidgetRecommender.swift in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions Campus-iOS/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ struct CampusApp: App {
@State var isLoginSheetPresented = false

init() {
#if !DEBUG
FirebaseApp.configure()
#endif
UITabBar.appearance().isOpaque = true
if #available(iOS 15.0, *) {
let appearance = UITabBarAppearance()
Expand Down
6 changes: 3 additions & 3 deletions Campus-iOS/Base/Entity/EntityImporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ final class Importer<EntityType: Entity, EntityContainer: Decodable, DecoderType
let storage = try decoder.decode(EntityContainer.self, from: data)
handler?(.success(storage))
} catch let apiError as APIError {
Crashlytics.crashlytics().record(error: apiError)
CrashlyticsService.log(apiError)
handler?(.failure(apiError))
return
} catch let decodingError as DecodingError {
Crashlytics.crashlytics().record(error: decodingError)
CrashlyticsService.log(decodingError)
handler?(.failure(decodingError))
return
} catch let error {
Crashlytics.crashlytics().record(error: error)
CrashlyticsService.log(error)
handler?(.failure(error))
}
}
Expand Down
4 changes: 2 additions & 2 deletions Campus-iOS/Base/Networking/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ struct TUMOnlineAPIResponse<T: Decodable>: Decodable {
return try $0.result.get()
}
catch {
Crashlytics.crashlytics().record(error: error)
return nil
CrashlyticsService.log(error)
return nil
}
}
}
Expand Down
25 changes: 25 additions & 0 deletions Campus-iOS/Crashlytics/CrashlyticsService.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// CrashlyticsService.swift
// Campus-iOS
//
// Created by Anton Wyrowski on 28.01.23.
//

import Foundation
import FirebaseCrashlytics

class CrashlyticsService {
static private let crashlytics = Crashlytics.crashlytics()

static func log(_ error: Error) -> Void {
#if !DEBUG
CrashlyticsService.crashlytics.record(error: error)
#endif
}

static func log(_ value: String) -> Void {
#if !DEBUG
CrashlyticsService.crashlytics.log(value)
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ final class AuthenticationHandler: RequestAdapter, RequestRetrier {
let encodedRequest = try URLEncoding.default.encode(urlRequest, with: ["pToken": pToken])
return completion(.success(encodedRequest))
} catch let error {
Crashlytics.crashlytics().record(error: error)
CrashlyticsService.log(error)
return completion(.failure(error))
}
case urlString where TUMCabeAPI.requiresAuth.contains { urlString.contains($0)}:
Expand Down

0 comments on commit ba97243

Please sign in to comment.