Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build Error and Update Codebase #198

Merged
merged 1 commit into from
Jun 10, 2024
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
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,93 +1,76 @@
{
"originHash" : "9a2ec0153ac68a34b7437f77b1581088266f22c19125dfe889c09bd915b8fdc2",
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
"version" : "1.2022062300.0"
"revision" : "748c7837511d0e6a507737353af268484e1745e2",
"version" : "1.2024011601.1"
}
},
{
"identity" : "cardinalkit",
"identity" : "app-check",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/CardinalKit",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "6162a67a0b821c2be9358bec798d5d3e94cc5783",
"version" : "0.3.5"
}
},
{
"identity" : "fhirmodels",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/FHIRModels",
"state" : {
"revision" : "e115442fb3c5d44ffb1dc9b4e039b77fd143ad96",
"version" : "0.4.0"
"revision" : "076b241a625e25eac22f8849be256dfb960fcdfe",
"version" : "10.19.1"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "8a8ec57a272e0d31480fb0893dda0cf4f769b57e",
"version" : "10.15.0"
"revision" : "8bcaf973b1d84e119b7c7c119abad72ed460979f",
"version" : "10.27.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b",
"version" : "10.13.0"
"revision" : "70df02431e216bed98dd461e0c4665889245ba70",
"version" : "10.27.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "aae45a320fd0d11811820335b1eabc8753902a40",
"version" : "9.2.5"
"revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
"version" : "9.4.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "c38ce365d77b04a9a300c31061c5227589e5597b",
"version" : "7.11.5"
"revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6",
"version" : "7.13.3"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "f1b366129d1125be7db83247e003fc333104b569",
"version" : "1.50.2"
"revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359",
"version" : "1.62.2"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
"version" : "3.1.1"
}
},
{
"identity" : "healthkitonfhir",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/HealthKitOnFHIR",
"state" : {
"revision" : "fdf8e4543718a940643598e4bd5e750e9c4c5540",
"version" : "0.2.4"
"revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193",
"version" : "3.4.1"
}
},
{
Expand All @@ -105,70 +88,124 @@
"location" : "https://github.com/spotify/ios-sdk.git",
"state" : {
"branch" : "master",
"revision" : "cdbdcb341ace5defa863cf323749376f7e4888e9"
"revision" : "55fd4a65b1b7fb483b583e6032168e1dc85ed178"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
"revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
"version" : "1.22.5"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
"version" : "2.30910.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
"version" : "2.3.1"
"revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
"version" : "2.4.0"
}
},
{
"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/StanfordSpezi/SpeziFirebase.git",
"state" : {
"revision" : "f05c859f75d317dca9b378b7f8a7cfa8e135df04",
"version" : "1.1.1"
}
},
{
"identity" : "spezifoundation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziFoundation",
"state" : {
"revision" : "01af5b91a54f30ddd121258e81aff2ddc2a99ff9",
"version" : "1.0.4"
}
},
{
"identity" : "researchkit",
"identity" : "spezionboarding",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/ResearchKit",
"location" : "https://github.com/StanfordSpezi/SpeziOnboarding.git",
"state" : {
"revision" : "9530fadc9d09c0b783388c752b0dbe841974b6af",
"version" : "2.2.18"
"revision" : "8d6dda3501720a1952573439b21a503cbecd9e0f",
"version" : "1.2.0"
}
},
{
"identity" : "researchkitonfhir",
"identity" : "spezistorage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/ResearchKitOnFHIR",
"location" : "https://github.com/StanfordSpezi/SpeziStorage",
"state" : {
"revision" : "1bc7a15760916ade4c5058fa798a871e80c2955c",
"version" : "0.1.6"
"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"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "3c54ab05249f59f2c6641dd2920b8358ea9ed127",
"version" : "1.24.0"
"revision" : "9f0c76544701845ad98716f3f6a774a892152bcb",
"version" : "1.26.0"
}
},
{
"identity" : "xctestextensions",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/XCTestExtensions",
"state" : {
"revision" : "a96a1680557507a9746bbb0529043b9767c503db",
"version" : "0.3.0"
"revision" : "1fe9b8e76aeb7a132af37bfa0892160c9b662dcc",
"version" : "0.4.10"
}
},
{
Expand All @@ -180,15 +217,24 @@
"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",
"location" : "https://github.com/SvenTiigi/YouTubePlayerKit.git",
"state" : {
"revision" : "6bbba75c8a8927e8073765849e22707d96b55205",
"version" : "1.5.2"
"revision" : "5ade0dfbabaf7456069b4e8f604de261bf6d7c67",
"version" : "1.8.0"
}
}
],
"version" : 2
"version" : 3
}
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
Loading
Loading