Skip to content
Open
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
2 changes: 2 additions & 0 deletions IOSAccessAssessment.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
"SWIFT_ACTIVE_COMPILATION_CONDITIONS[arch=*]" = STRESS_MODE;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "IOSAccessAssessment/IOSAccessAssessment-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -1376,6 +1377,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
"SWIFT_ACTIVE_COMPILATION_CONDITIONS[arch=*]" = STRESS_MODE;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "IOSAccessAssessment/IOSAccessAssessment-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3222F9152B622DFD0019A079"
BuildableName = "IOSAccessAssessment.app"
BlueprintName = "IOSAccessAssessment"
ReferencedContainer = "container:IOSAccessAssessment.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3222F9152B622DFD0019A079"
BuildableName = "IOSAccessAssessment.app"
BlueprintName = "IOSAccessAssessment"
ReferencedContainer = "container:IOSAccessAssessment.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3222F9152B622DFD0019A079"
BuildableName = "IOSAccessAssessment.app"
BlueprintName = "IOSAccessAssessment"
ReferencedContainer = "container:IOSAccessAssessment.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
5 changes: 5 additions & 0 deletions IOSAccessAssessment/ARCamera/TestCameraManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -562,4 +562,9 @@ extension TestCameraManager {
self.cameraMeshResults = nil
self.cameraCache = ARCameraCache()
}

@MainActor
func resume() throws {
self.outputConsumer?.resumeSession()
}
}
17 changes: 15 additions & 2 deletions IOSAccessAssessment/View/TestMode/TestCameraView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ struct TestCameraView: View {
}
}
.onDisappear {
Task {
do {
try manager.pause()
locationManager.stopLocationUpdates()
} catch {
print("Error pausing ARCameraManager: \(error)")
}
}
}
.alert(ARCameraViewConstants.Texts.managerStatusAlertTitleKey, isPresented: $managerConfigureStatusViewModel.isFailed, actions: {
Button(ARCameraViewConstants.Texts.managerStatusAlertDismissButtonKey) {
Expand Down Expand Up @@ -284,8 +292,13 @@ struct TestCameraView: View {
// If the AnnotationView is dismissed, clear capture history and move to the next capture data
Task {
if (oldValue == true && newValue == false) {
await sharedAppData.refreshQueue()
self.currentIndex = max(min(self.currentIndex + 1, self.totalCaptures - 1), 0)
do {
await sharedAppData.refreshQueue()
try manager.resume()
self.currentIndex = max(min(self.currentIndex + 1, self.totalCaptures - 1), 0)
} catch {
managerConfigureStatusViewModel.update(isFailed: true, errorMessage: error.localizedDescription)
}
}
}
}
Expand Down