Skip to content

Commit

Permalink
Merge branch 'main' into feature/BAL-195-GP-PROFILE-CHART
Browse files Browse the repository at this point in the history
* main:
  Fix Build Error and Update Codebase (#198)
  BAL-194-GP-NEW EVENT TRACKING (#196)

# Conflicts:
#	Balance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
gperissetcelteeka committed Jun 10, 2024
2 parents 694dd5a + e2a7001 commit 37c7f03
Show file tree
Hide file tree
Showing 19 changed files with 136 additions and 457 deletions.
173 changes: 41 additions & 132 deletions Balance.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "1c0f91032eceeb1ee5fdc9ba2c0f310e642edbda05c506be04c51ea181c42cf8",
"originHash" : "046d81b689bb9375e29ad15d6c5df7442a32fff88a2e2a791c2d3b5622b82ada",
"pins" : [
{
"identity" : "abseil-cpp-binary",
Expand All @@ -19,40 +19,22 @@
"version" : "10.19.1"
}
},
{
"identity" : "cardinalkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/CardinalKit",
"state" : {
"revision" : "6162a67a0b821c2be9358bec798d5d3e94cc5783",
"version" : "0.3.5"
}
},
{
"identity" : "fhirmodels",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/FHIRModels",
"state" : {
"revision" : "e115442fb3c5d44ffb1dc9b4e039b77fd143ad96",
"version" : "0.4.0"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "9d17b500cd98d9a7009751ad62f802e152e97021",
"version" : "10.26.0"
"revision" : "8bcaf973b1d84e119b7c7c119abad72ed460979f",
"version" : "10.27.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "16244d177c4e989f87b25e9db1012b382cfedc55",
"version" : "10.25.0"
"revision" : "70df02431e216bed98dd461e0c4665889245ba70",
"version" : "10.27.0"
}
},
{
Expand Down Expand Up @@ -91,15 +73,6 @@
"version" : "3.4.1"
}
},
{
"identity" : "healthkitonfhir",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/HealthKitOnFHIR",
"state" : {
"revision" : "418929f315f37e6d9c8f30f40030bc65b9cc47c9",
"version" : "0.2.8"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
Expand All @@ -115,7 +88,7 @@
"location" : "https://github.com/spotify/ios-sdk.git",
"state" : {
"branch" : "master",
"revision" : "9a46112bbf8ca7cb42fb28ede0a3fe9a85ab006c"
"revision" : "55fd4a65b1b7fb483b583e6032168e1dc85ed178"
}
},
{
Expand Down Expand Up @@ -146,21 +119,75 @@
}
},
{
"identity" : "researchkit",
"identity" : "spezi",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/Spezi",
"state" : {
"revision" : "734f90c19422a4196762b0e1dd055471066e89ee",
"version" : "1.3.0"
}
},
{
"identity" : "speziaccount",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziAccount",
"state" : {
"revision" : "2de07209430fe7b13c44790eab948b30482fcb9d",
"version" : "1.2.4"
}
},
{
"identity" : "spezifirebase",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/ResearchKit",
"location" : "https://github.com/StanfordSpezi/SpeziFirebase",
"state" : {
"revision" : "3f70adf898b5985ba15e25d5074d86a9c657d305",
"version" : "2.2.30"
"revision" : "f05c859f75d317dca9b378b7f8a7cfa8e135df04",
"version" : "1.1.1"
}
},
{
"identity" : "researchkitonfhir",
"identity" : "spezifoundation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/ResearchKitOnFHIR",
"location" : "https://github.com/StanfordSpezi/SpeziFoundation",
"state" : {
"revision" : "1bc7a15760916ade4c5058fa798a871e80c2955c",
"version" : "0.1.6"
"revision" : "01af5b91a54f30ddd121258e81aff2ddc2a99ff9",
"version" : "1.0.4"
}
},
{
"identity" : "spezionboarding",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziOnboarding",
"state" : {
"revision" : "8d6dda3501720a1952573439b21a503cbecd9e0f",
"version" : "1.2.0"
}
},
{
"identity" : "spezistorage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziStorage",
"state" : {
"revision" : "b958df9b31f24800388a7bfc28f457ce7b82556c",
"version" : "1.0.2"
}
},
{
"identity" : "speziviews",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziViews",
"state" : {
"revision" : "4d2a724d97c8f19ac7de7aa2c046b1cb3ef7b279",
"version" : "1.3.1"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb",
"version" : "1.1.0"
}
},
{
Expand All @@ -177,8 +204,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/XCTestExtensions",
"state" : {
"revision" : "a96a1680557507a9746bbb0529043b9767c503db",
"version" : "0.3.0"
"revision" : "1fe9b8e76aeb7a132af37bfa0892160c9b662dcc",
"version" : "0.4.10"
}
},
{
Expand All @@ -190,6 +217,15 @@
"version" : "0.3.5"
}
},
{
"identity" : "xctruntimeassertions",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/XCTRuntimeAssertions",
"state" : {
"revision" : "51da3403f128b120705571ce61e0fe190f8889e6",
"version" : "1.0.1"
}
},
{
"identity" : "youtubeplayerkit",
"kind" : "remoteSourceControl",
Expand Down
2 changes: 0 additions & 2 deletions Balance/Balance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// SPDX-License-Identifier: MIT
//

import CardinalKit
import SwiftUI

// swiftlint:disable closure_body_length
Expand Down Expand Up @@ -43,7 +42,6 @@ struct Balance: App {
}
}
.testingSetup()
.cardinalKit(appDelegate)
.environmentObject(noteStore)
.environmentObject(drawStore)
.environmentObject(coloringStore)
Expand Down
58 changes: 13 additions & 45 deletions Balance/BalanceAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,75 +6,43 @@
// SPDX-License-Identifier: MIT
//

import CardinalKit
import FHIR
import FHIRToFirestoreAdapter
import FirebaseAccount
import class FirebaseFirestore.FirestoreSettings
import FirestoreDataStorage
import FirestoreStoragePrefixUserIdAdapter
import HealthKit
import HealthKitDataSource
import HealthKitToFHIRAdapter
import Questionnaires
import Scheduler
import Spezi
import SpeziFirestore
import SwiftUI

class BalanceAppDelegate: CardinalKitAppDelegate {
class BalanceAppDelegate: SpeziAppDelegate {
override var configuration: Configuration {
Configuration(standard: FHIR()) {
#if !DEMO
Configuration {
#if !DEMO
if !FeatureFlags.disableFirebase {
if FeatureFlags.useFirebaseEmulator {
FirebaseAccountConfiguration(emulatorSettings: (host: "localhost", port: 9099))
} else {
FirebaseAccountConfiguration()
}
firestore
}
if HKHealthStore.isHealthDataAvailable() {
healthKit
}
#endif
#endif
}
}

#if !DEMO
private var firestore: Firestore<FHIR> {

#if !DEMO
private var firestore: Firestore {
let settings = FirestoreSettings()
if FeatureFlags.useFirebaseEmulator {
settings.host = "localhost:8080"
settings.isPersistenceEnabled = false
settings.cacheSettings = MemoryCacheSettings()
settings.isSSLEnabled = false
}

return Firestore(
adapter: {
FHIRToFirestoreAdapter()
FirestoreStoragePrefixUserIdAdapter()
},
settings: settings
)
}
#endif
#endif

private var healthKit: HealthKit<FHIR> {
HealthKit {
CollectSample(
HKQuantityType(.stepCount),
deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch)
)
} adapter: {
HealthKitToFHIRAdapter()
}
}


func application(
override func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
_ = super.application(application, configurationForConnecting: connectingSceneSession, options: options)
let sceneConfig = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
sceneConfig.delegateClass = SceneDelegate.self
return sceneConfig
Expand Down
1 change: 0 additions & 1 deletion Balance/Diary/Views/DiaryNoteEntryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// SPDX-License-Identifier: MIT
//

import CardinalKit
import SwiftUI

struct DiaryNoteEntryView: View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ struct YoutubeModalView: View {
let youTubePlayer = YouTubePlayer(
source: .video(id: videoID),
configuration: .init(
fullscreenMode: .system,
autoPlay: true,
showControls: true
)
Expand Down
4 changes: 2 additions & 2 deletions Balance/Distraction/Music/iOS_SDK/SpotifyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class SpotifyViewController: UIViewController {
guard let sessionManager = sessionManager else {
return
}
sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly)
sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly, campaign: nil)
}

@objc
Expand Down Expand Up @@ -454,7 +454,7 @@ extension SpotifyViewController: UITableViewDelegate, UITableViewDataSource {
guard let sessionManager = sessionManager else {
return
}
sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly)
sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly, campaign: nil)
}
}

Expand Down
3 changes: 0 additions & 3 deletions Balance/Home/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
// SPDX-License-Identifier: MIT
//

import Account
import SwiftUI
import class FHIR.FHIR
import FirebaseAccount
import WatchConnectivity

struct HomeView: View {
Expand Down
1 change: 0 additions & 1 deletion Balance/Login/BalanceAccount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// SPDX-License-Identifier: MIT
//

import Onboarding
import SwiftUI

struct BalanceAccount: View {
Expand Down
Loading

0 comments on commit 37c7f03

Please sign in to comment.