-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offline Directions errors-clarification #2374
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9f32b0d
2273-errors-clarification: added new error case for indicating incorr…
Udumft 0b4a128
2273-errors-clarification: removed sending error in case Directions i…
Udumft 7a83226
2273-errors-clarification: removed unused error description
Udumft 62d4ee3
2273-errors-clarification: comment formatting
Udumft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
MapboxCoreNavigation/Resources/Base.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Found an invalid route while offline."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Unable to calculate the requested route while offline."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "Mapbox Navigation SDK for iOS version %@ is now available."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Es wurde eine ungültige Route berechnet, da keine Verbindung besteht."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Es ist nicht möglich, die gewünschte Route zu berechnen, da keine Verbindung besteht."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "Mapbox Navigation SDK für iOS Version %@ ist jetzt verfügbar."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Ha encontrado una ruta no válida en modo offline."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "No se puede calcular la ruta peticionada en modo offline."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "La versión %@ de Mapbox Navigation SDK para iOS está disponible."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Impossible de charger cet itinéraire hors ligne"; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Impossible de calculer cet itinéraire hors ligne"; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "La version %@ du SDK iOS Mapbox est maintenant disponible"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "オフラインの為ルートを作成できません"; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "オフラインの為、ルートを作成できません"; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "iOS %@用 Mapbox Navigation SDKが使用できます"; | ||
|
3 changes: 0 additions & 3 deletions
3
MapboxCoreNavigation/Resources/pt-PT.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Foi encontrada uma rota inválida desligado da internet."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Não é possível calcular a rota pedida desligado da internet."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "O SDK de Navegação Mapbox para iOS versão %@ já está disponível."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Получен неверный маршрут без интернета."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Требуемый маршрут невозможно рассчитать без интернета."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "Доступна версия Mapbox Navigation SDK %@ для iOS."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Ogiltligt offline-rutt."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Kunde inte beräkna rutten i offline-läge."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "Mapbox Navigation SDK for iOS version %@ är nu tillgängligt."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Đã tìm thấy tuyến đường không hợp lệ trong khi ngoại tuyến."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Không tìm thấy tuyến đường trong khi ngoại tuyến."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "Mapbox Navigation SDK cho iOS mới ra phiên bản %@."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/* Error message when an offline route request returns a response that can’t be deserialized */ | ||
"OFFLINE_CORRUPT_DATA" = "Found an invalid route while offline."; | ||
|
||
/* Error description when an offline route request returns no result */ | ||
"OFFLINE_NO_RESULT" = "Unable to calculate the requested route while offline."; | ||
|
||
/* Inform developer an update is available */ | ||
"UPDATE_AVAILABLE" = "Mapbox Navigation SDK for iOS version %@ is now available."; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per #2273 (comment), the only error case we should handle up here would be that
self
(NavigationDirections) has been deallocated.Upon closer inspection, I’m wondering if it’s even appropriate to call the completion handler in this case. For mapbox/mapbox-gl-native-ios#210 mapbox/mapbox-gl-native-ios#200 (comment), we found that calling the completion handler after
self
has gone away forces the caller to consider whetherself
has gone away because the parent view controller has gone away or the application is terminating.In other words, when an application calls this method from a MapViewController that holds a strong reference to NavigationDirections, does it expect the completion handler to magically be called even if that MapViewController has been deallocated (for example, because the user has exited that map screen to go to a different part of the application)? If the application has neglected to make
self
weak inside the completion handler, that could create other unexpected behavior in the application. The completion handler would have to explicitly handle the.cancelled
case, so at least we would have to document that postcondition on the method, which is unfortunate.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not calling a completion under some conditions may also lead to unexpected behavior. At least such use case must also be documented so that users are aware that completion call is not guaranteed.
Also, if we choose not to rise an explicit error message when
NavigationDirections
were deallocated,noData
error becomes unused, so we can safely remove it