You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* vk-history-recorder: added HistoryRecorder; untied Navigation and HistoryRecorderHandler; Updated relative parts and tests to use new handler; swapped method deprecation for HistoryRecording; CHANGELOG updated; appended code doc for HistoryRecroding
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@
51
51
* All logs that Navigation SDK produces are now sent to the `MapboxCommon` framework. You can intercept these logs in your own code using `LogConfiguration.registerLogWriterBackend(forLogWriter:)` method from `MapboxCommon` framework. ([#3944](https://github.com/mapbox/mapbox-navigation-ios/pull/3944))
52
52
* Fixed an issue where popped window doesn't get updated in appearance when style changes on phone. ([#3954](https://github.com/mapbox/mapbox-navigation-ios/pull/3954))
53
53
* Fixed an issue where detailed feedback items don't change color in different style. ([#3954](https://github.com/mapbox/mapbox-navigation-ios/pull/3954))
54
+
* Update method deprecation for `HistoryRecording` protocol. Static methods are now preferred over instance ones. ([#3960](https://github.com/mapbox/mapbox-navigation-ios/pull/3960))
Path to the directory where history file could be stored when `HistoryRecording.stopRecordingHistory(writingFileWith:)` is called.
7
+
8
+
Setting `nil` disables history recording. Defaults to `nil`. Updating value from `nil` to `non-nil` value results in recreating the shared instance since `nil` guaranteed an invalid handler. Further updates have no effect.
9
+
*/
10
+
staticvarhistoryDirectoryURL:URL?=nil
11
+
{
12
+
didSet {
13
+
if _historyRecorder?.handle ==nil && historyDirectoryURL !=nil{
14
+
_historyRecorder =nil
15
+
}elseif oldValue !=nil{
16
+
Log.warning("`historyDirectoryURL` is updated excessively.", category:.settings)
17
+
}
18
+
}
19
+
}
20
+
21
+
/**
22
+
The shared instance
23
+
*/
24
+
staticvarshared:HistoryRecorder{
25
+
guardlet historyRecorder = _historyRecorder else{
26
+
lethistoryRecorder=HistoryRecorder()
27
+
_historyRecorder = historyRecorder
28
+
return historyRecorder
29
+
}
30
+
return historyRecorder
31
+
}
32
+
33
+
/// `True` when `HistoryRecorder.shared` requested at least once.
Copy file name to clipboardExpand all lines: Sources/MapboxCoreNavigation/HistoryRecording.swift
+11-13Lines changed: 11 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ public protocol HistoryRecording {
14
14
/**
15
15
Path to the directory where history file could be stored when `stopRecordingHistory(writingFileWith:)` is called.
16
16
17
-
Setting `nil` disables history recording. Defaults to `nil`.
17
+
Setting `nil` disables history recording. Defaults to `nil`. Updating value from `nil` to `non-nil` value results in recreating the shared instance since `nil` guaranteed an invalid handler. Further updates have no effect.
18
18
*/
19
19
staticvarhistoryDirectoryURL:URL?{getset}
20
20
@@ -23,14 +23,14 @@ public protocol HistoryRecording {
23
23
24
24
- postcondition: Use the `stopRecordingHistory(writingFileWith:)` method to stop recording history and write the recorded history to a file.
@@ -41,7 +41,6 @@ public protocol HistoryRecording {
41
41
42
42
- precondition: Use the `startRecordingHistory()` method to begin recording history. If the `startRecordingHistory()` method has not been called, this method has no effect.
@@ -52,6 +51,7 @@ public protocol HistoryRecording {
52
51
53
52
- precondition: Use the `startRecordingHistory()` method to begin recording history. If the `startRecordingHistory()` method has not been called, this method has no effect.
0 commit comments