Skip to content

Commit

Permalink
Merge pull request #171 from Esri/mhd/Fix_Warnings
Browse files Browse the repository at this point in the history
Fix warnings with SDK release candidate.
  • Loading branch information
mhdostal authored Apr 25, 2022
2 parents fcba186 + 6ed3186 commit 10dfc98
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Examples/ArcGISToolkitExamples/ARExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ARExample: UIViewController {
private let arView = ArcGISARView(renderVideoFeed: true)

/// Denotes whether we've placed the scene in table top experiences.
private var didPlaceScene: Bool = false
private var didPlaceScene = false

// View controller displaying current status of `ARExample`.
private let statusViewController: ARStatusViewController? = {
Expand Down Expand Up @@ -67,10 +67,10 @@ class ARExample: UIViewController {
private var toolbar = UIToolbar(frame: .zero)

/// Button used to display the `CalibrationView`.
private let calibrationItem = UIBarButtonItem(title: "Calibration", style: .plain, target: self, action: #selector(displayCalibration(_:)))
private let calibrationItem = UIBarButtonItem(title: "Calibration", style: .plain, target: ARExample.self, action: #selector(displayCalibration(_:)))

/// Button used to change the current scene.
private let sceneItem = UIBarButtonItem(title: "Change Scene", style: .plain, target: self, action: #selector(changeScene(_:)))
private let sceneItem = UIBarButtonItem(title: "Change Scene", style: .plain, target: ARExample.self, action: #selector(changeScene(_:)))

// MARK: Initialization

Expand Down
2 changes: 2 additions & 0 deletions Examples/ArcGISToolkitExamples/JobManagerExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ extension AGSJobStatus {
return "Succeeded"
case .started:
return "Started"
case .canceling:
return "Canceling"
@unknown default:
fatalError("Unknown AGSJobStatus")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ extension AGSLocationDataSourceStatus {
return "Started"
case .failedToStart:
return "Failed to start"
case .stopping:
return "Stopping"
@unknown default:
fatalError("Unknown AGSLocationDataSourceStatus")
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/ArcGISToolkitExamples/Misc/CalibrationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import ArcGISToolkit
/// A view displaying controls for adjusting a scene view's location, heading, and elevation. Used to calibrate an AR session.
class CalibrationView: UIView {
/// Denotes whether to show the elevation control and label; defaults to `true`.
var elevationControlVisibility: Bool = true {
var elevationControlVisibility = true {
didSet {
elevationSlider.isHidden = !elevationControlVisibility
elevationLabel.isHidden = !elevationControlVisibility
Expand Down
7 changes: 4 additions & 3 deletions Sources/ArcGISToolkit/AR/ArcGISARView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ public class ArcGISARView: UIView {
/// - Since: 100.6.0
public func stopTracking() {
arSCNView.session.pause()
locationDataSource?.stop()
isTracking = false
locationDataSource?.stop { [weak self] in
self?.isTracking = false
}
}

// MARK: Private
Expand Down Expand Up @@ -528,7 +529,7 @@ extension ArcGISARView: AGSLocationChangeHandlerDelegate {

if locationTrackingMode != .continuous {
// Stop the data source if the tracking mode is not continuous.
locationDataSource.stop()
locationDataSource.stop(completion: nil)
}

locationChangeHandlerDelegate?.locationDataSource?(locationDataSource, locationDidChange: location)
Expand Down

0 comments on commit 10dfc98

Please sign in to comment.