Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# score-ios
SCORE is a centralized sports information App for the Cornell community to discover and stay informed on athletic games.
# Score

Score aims to become the Cornell community’s go-to for all sports events information, with the following features (in order of implementation):
<p align="center"><img src="https://github.com/user-attachments/assets/d3025ab3-ce0b-4f83-852b-343627154fd8" width=150 /></p>

1. Centralized hub for sports game information discovery
Score is Cornell’s all-in-one sports discovery hub that makes Cornell sports easily accessible and engaging for the entire community. A free and open-source app, Score helps facilitate the seamless discovery, tracking, and engagement of Cornell sports, allowing students to conveniently stay informed on sports games and feel motivated to actively participate in the campus sports culture.

2. Real-time game status and score updates

3. Personalized game attendance planning
## Getting Started

(Taken from Notion, please update when finalized)
1. Clone the repository.
2. Download and uncompress the `ScoreSecrets/` folder, which AppDev members can find it pinned in the `#score-ios` Slack channel. Once done, drag the following folder into the root of the project through **FINDER (NOT Xcode)**. The folder should contain the following files:
- `GoogleService-Info.plist`
- `Keys.plist`
3. Build the project and you should be good to go! Select the `score-ios` schema to use our development server and `score-ios-prod` to use our production server.

## Common Issues

- If you're running into missing package errors, add the gameAPI folder as a package dependency. Go to File -> Add Package Dependencies -> Add Local -> select the folder
- The .zip folder can also found pinned in the `#score-ios` Slack channel.
61 changes: 57 additions & 4 deletions score-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
/* Begin PBXBuildFile section */
1C87865D2D8CD76900EBDF74 /* TrailingFadeGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C87865C2D8CD76900EBDF74 /* TrailingFadeGradient.swift */; };
1C87865F2D8CDADC00EBDF74 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C87865E2D8CDADC00EBDF74 /* String+Extension.swift */; };
2C1375BD2E722CB70089EBC7 /* GameAPI in Frameworks */ = {isa = PBXBuildFile; productRef = 2C1375BC2E722CB70089EBC7 /* GameAPI */; };
2C1375BF2E7230250089EBC7 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 2C1375BE2E7230250089EBC7 /* FirebaseAnalytics */; };
2C1375C12E7230250089EBC7 /* FirebaseCore in Frameworks */ = {isa = PBXBuildFile; productRef = 2C1375C02E7230250089EBC7 /* FirebaseCore */; };
2C1375C32E7230250089EBC7 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 2C1375C22E7230250089EBC7 /* FirebaseCrashlytics */; };
2C1375C52E7230630089EBC7 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 2C1375C42E7230630089EBC7 /* FirebaseAnalytics */; };
2C1375C72E7230630089EBC7 /* FirebaseCore in Frameworks */ = {isa = PBXBuildFile; productRef = 2C1375C62E7230630089EBC7 /* FirebaseCore */; };
2C1375CB2E7233390089EBC7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2C1375CA2E7233390089EBC7 /* GoogleService-Info.plist */; };
CE335CD32C922E8D0037F572 /* PrimaryColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE335CD22C922E8D0037F572 /* PrimaryColors.swift */; };
CE335CD52C922ECB0037F572 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE335CD42C922ECB0037F572 /* Constants.swift */; };
CE335CD72C922F390037F572 /* Dates.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE335CD62C922F390037F572 /* Dates.swift */; };
Expand Down Expand Up @@ -105,6 +112,7 @@
/* Begin PBXFileReference section */
1C87865C2D8CD76900EBDF74 /* TrailingFadeGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrailingFadeGradient.swift; sourceTree = "<group>"; };
1C87865E2D8CDADC00EBDF74 /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
2C1375CA2E7233390089EBC7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
CE335CD22C922E8D0037F572 /* PrimaryColors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryColors.swift; sourceTree = "<group>"; };
CE335CD42C922ECB0037F572 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
CE335CD62C922F390037F572 /* Dates.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dates.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -190,7 +198,13 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2C1375C52E7230630089EBC7 /* FirebaseAnalytics in Frameworks */,
2C1375BD2E722CB70089EBC7 /* GameAPI in Frameworks */,
2C1375C12E7230250089EBC7 /* FirebaseCore in Frameworks */,
D89102042CED69EF004CE226 /* Apollo in Frameworks */,
2C1375C32E7230250089EBC7 /* FirebaseCrashlytics in Frameworks */,
2C1375BF2E7230250089EBC7 /* FirebaseAnalytics in Frameworks */,
2C1375C72E7230630089EBC7 /* FirebaseCore in Frameworks */,
D89102182CF151DD004CE226 /* GameAPI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -433,6 +447,7 @@
CEA25A972D752C6F00B9837A /* ScoreSecrets */ = {
isa = PBXGroup;
children = (
2C1375CA2E7233390089EBC7 /* GoogleService-Info.plist */,
CEA25A962D75292900B9837A /* Keys.xcconfig */,
);
path = ScoreSecrets;
Expand Down Expand Up @@ -593,6 +608,7 @@
files = (
D8DD4E642CFD48ED00F2C46E /* Team.graphql in Resources */,
D891020B2CED6A8E004CE226 /* Game.graphql in Resources */,
2C1375CB2E7233390089EBC7 /* GoogleService-Info.plist in Resources */,
CE528FE42C96A27500C238B5 /* Poppins-Light.ttf in Resources */,
CE528FEE2C96A27500C238B5 /* Poppins-Black.ttf in Resources */,
CE528FEC2C96A27500C238B5 /* Poppins-LightItalic.ttf in Resources */,
Expand Down Expand Up @@ -871,7 +887,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 26;
DEVELOPMENT_ASSET_PATHS = "\"score-ios/Preview Content\"";
DEVELOPMENT_TEAM = ZGMCXU7X3U;
DEVELOPMENT_TEAM = W7U2WA4D54;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "score-ios/Info.plist";
Expand All @@ -885,7 +901,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.cornellappdev.score-ios";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand All @@ -905,7 +921,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 26;
DEVELOPMENT_ASSET_PATHS = "\"score-ios/Preview Content\"";
DEVELOPMENT_TEAM = ZGMCXU7X3U;
DEVELOPMENT_TEAM = W7U2WA4D54;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "score-ios/Info.plist";
Expand All @@ -919,7 +935,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.cornellappdev.score-ios";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -1051,6 +1067,14 @@
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
2CBC5B0A2E722C31006C1167 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 12.2.0;
};
};
D89102012CED68D9004CE226 /* XCRemoteSwiftPackageReference "apollo-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/apollographql/apollo-ios.git";
Expand All @@ -1062,6 +1086,35 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
2C1375BC2E722CB70089EBC7 /* GameAPI */ = {
isa = XCSwiftPackageProductDependency;
productName = GameAPI;
};
2C1375BE2E7230250089EBC7 /* FirebaseAnalytics */ = {
isa = XCSwiftPackageProductDependency;
package = 2CBC5B0A2E722C31006C1167 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseAnalytics;
};
2C1375C02E7230250089EBC7 /* FirebaseCore */ = {
isa = XCSwiftPackageProductDependency;
package = 2CBC5B0A2E722C31006C1167 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCore;
};
2C1375C22E7230250089EBC7 /* FirebaseCrashlytics */ = {
isa = XCSwiftPackageProductDependency;
package = 2CBC5B0A2E722C31006C1167 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCrashlytics;
};
2C1375C42E7230630089EBC7 /* FirebaseAnalytics */ = {
isa = XCSwiftPackageProductDependency;
package = 2CBC5B0A2E722C31006C1167 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseAnalytics;
};
2C1375C62E7230630089EBC7 /* FirebaseCore */ = {
isa = XCSwiftPackageProductDependency;
package = 2CBC5B0A2E722C31006C1167 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCore;
};
D89102032CED69EF004CE226 /* Apollo */ = {
isa = XCSwiftPackageProductDependency;
package = D89102012CED68D9004CE226 /* XCRemoteSwiftPackageReference "apollo-ios" */;
Expand Down

This file was deleted.

Binary file modified score-ios/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions score-ios/Networking/GamesCacheManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ class GamesCacheManager {
var newUpcomingGames: [GamesQuery.Data.Game] = []

for game in games {
// TODO: make utc date not optional on backend
if let gameDate = self.parseDate(from: game.utcDate!) {
if let gameDate = self.parseDate(from: game.date) {
// Check if game is live (started but within 2 hours)
let isLive = gameDate < now && now.timeIntervalSince(gameDate) <= twoHours

Expand Down
2 changes: 1 addition & 1 deletion score-ios/Networking/NetworkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NetworkManager {
let apolloClient = ApolloClient(url: ScoreEnvironment.baseURL)

func fetchGames(limit: Int, offset: Int, completion: @escaping ([GamesQuery.Data.Game]?, Error?) -> Void) {
apolloClient.fetch(query: GamesQuery(limit: limit, offset: offset)) { result in
apolloClient.fetch(query: GamesQuery()) { result in
switch result {
case .success(let graphQLResult):
if let gamesData = graphQLResult.data?.games?.compactMap({ $0 }) {
Expand Down
11 changes: 11 additions & 0 deletions score-ios/Views/MainViews/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@
//

import SwiftUI
import FirebaseCore

class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
return true
}
}

@main
struct score_iosApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate

var body: some Scene {
WindowGroup {
ContentView()
Expand Down