Skip to content

Commit

Permalink
LocoKit API changed slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
sobri909 committed Dec 14, 2023
1 parent b31c14f commit 3ee06d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Arc Mini/Core/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
logger.info("didFinishLaunchingWithOptions")

LocoKitService.apiKey = "bee1aa1af978486b9186780a07cc240e"
ActivityTypesCache.highlander.store = RecordingManager.store
CoreMLModelUpdater.highlander.store = RecordingManager.store
LocomotionManager.highlander.coordinateAssessor = CoordinateTrustManager(store: RecordingManager.store)
LocomotionManager.highlander.appGroup = AppGroup(appName: .arcMini, suiteName: "group.ArcApp")
LocomotionManager.highlander.appGroup?.timelineRecorder = RecordingManager.recorder
Expand Down
4 changes: 3 additions & 1 deletion Arc Mini/Managers/TasksManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ class TasksManager {
register(.coreMLModelUpdates, minimumDelay: .oneHour) { task in
TasksManager.update(.coreMLModelUpdates, to: .running)
RecordingManager.store.connectToDatabase()
CoreMLModelUpdater.highlander.updateQueuedModels(task: task as! BGProcessingTask, store: RecordingManager.store) { expired in
CoreMLModelUpdater.highlander.updateQueuedModels(
task: task as! BGProcessingTask, currentClassifier: RecordingManager.highlander.recorder.classifier
) { expired in
TasksManager.update(.coreMLModelUpdates, to: expired ? .expired : .completed)
TasksManager.highlander.scheduleBackgroundTasks()
RecordingManager.safelyDisconnectFromDatabase()
Expand Down

0 comments on commit 3ee06d2

Please sign in to comment.