Просмотр исходного кода

scrub old name from code

in Shortcuts, HealthKit, FileStorageTests, and URLs
Mike Plante 2 лет назад
Родитель
Сommit
08e6a801a2

+ 1 - 5
FreeAPS/Resources/Info.plist

@@ -4,10 +4,6 @@
 <dict>
 	<key>AppGroupID</key>
 	<string>$(APP_GROUP_ID)</string>
-	<key>BGTaskSchedulerPermittedIdentifiers</key>
-	<array>
-		<string>com.freeapsx.background-task.critical-event-log</string>
-	</array>
 	<key>CBBundleDisplayName</key>
 	<string>$(APP_DISPLAY_NAME)</string>
 	<key>CFBundleDevelopmentRegion</key>
@@ -32,7 +28,7 @@
 			<key>CFBundleTypeRole</key>
 			<string>None</string>
 			<key>CFBundleURLName</key>
-			<string>com.artificial-pancreas-iaps</string>
+			<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 			<key>CFBundleURLSchemes</key>
 			<array>
 				<string>$(APP_URL_SCHEME)</string>

+ 2 - 2
FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift

@@ -495,8 +495,8 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P
 
         newGlucose += samples
             .compactMap { sample -> HealthKitSample? in
-                let fromFAX = sample.metadata?[Config.freeAPSMetaKey] as? Bool ?? false
-                guard !fromFAX else { return nil }
+                let fromTrio = sample.metadata?[Config.freeAPSMetaKey] as? Bool ?? false
+                guard !fromTrio else { return nil }
                 return HealthKitSample(
                     healthKitId: sample.uuid.uuidString,
                     date: sample.startDate,

+ 2 - 2
FreeAPS/Sources/Shortcuts/State/ListStateIntent.swift

@@ -16,13 +16,13 @@ import Foundation
         Summary("List all states of Trio")
     }
 
-    @MainActor func perform() async throws -> some ReturnsValue<StateiAPSResults> & ShowsSnippetView {
+    @MainActor func perform() async throws -> some ReturnsValue<StateResults> & ShowsSnippetView {
         let glucoseValues = try? stateIntent.getLastBG()
         let iob_cob_value = try? stateIntent.getIOB_COB()
 
         guard let glucoseValue = glucoseValues else { throw StateIntentError.NoBG }
         guard let iob_cob = iob_cob_value else { throw StateIntentError.NoIOBCOB }
-        let BG = StateiAPSResults(
+        let BG = StateResults(
             glucose: glucoseValue.glucose,
             trend: glucoseValue.trend,
             delta: glucoseValue.delta,

+ 1 - 1
FreeAPS/Sources/Shortcuts/State/ListStateView.swift

@@ -3,7 +3,7 @@ import Foundation
 import SwiftUI
 
 struct ListStateView: View {
-    var state: StateiAPSResults
+    var state: StateResults
 
     private var numberFormatter: NumberFormatter {
         let formatter = NumberFormatter()

+ 3 - 3
FreeAPS/Sources/Shortcuts/State/StateIntentRequest.swift

@@ -7,7 +7,7 @@ enum StateIntentError: Error {
     case NoIOBCOB
 }
 
-@available(iOS 16, *) struct StateiAPSResults: AppEntity {
+@available(iOS 16, *) struct StateResults: AppEntity {
     static var defaultQuery = StateBGQuery()
 
     static var typeDisplayRepresentation: TypeDisplayRepresentation = "Trio State Result"
@@ -44,11 +44,11 @@ enum StateIntentError: Error {
 }
 
 @available(iOS 16.0, *) struct StateBGQuery: EntityQuery {
-    func entities(for _: [StateiAPSResults.ID]) async throws -> [StateiAPSResults] {
+    func entities(for _: [StateResults.ID]) async throws -> [StateResults] {
         []
     }
 
-    func suggestedEntities() async throws -> [StateiAPSResults] {
+    func suggestedEntities() async throws -> [StateResults] {
         []
     }
 }

+ 1 - 1
FreeAPSTests/FileStorageTests.swift

@@ -9,7 +9,7 @@ class FileStorageTests: XCTestCase {
         let value: Decimal
     }
 
-    func testFileStorageOiAPS() {
+    func testFileStorageTrio() {
         let dummyObject = DummyObject(id: "21342Z", value: 78.2)
         fileStorage.save(dummyObject, as: "dummyObject")
         let dummyObjectRetrieve = fileStorage.retrieve("dummyObject", as: DummyObject.self)