Skip to content
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

Local Notification direction arrows are always right-oriented #2267

Closed
billyking991 opened this issue Nov 11, 2019 · 4 comments · Fixed by #2270
Closed

Local Notification direction arrows are always right-oriented #2267

billyking991 opened this issue Nov 11, 2019 · 4 comments · Fixed by #2270
Labels
bug Something isn’t working
Milestone

Comments

@billyking991
Copy link

I've been testing Local Notifications for about a week and I'm only seeing right-oriented arrows in the notifications. If I come up to a left turn, the arrow displayed in the notification is a right arrow. This also goes for left merges, when the destination is on the left, and any other left-oriented directions. I have yet to see any left turns in the notifications.

My implementation consists of only adding the UserNotifications framework and asking for permission to display local notifications:

let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.alert, .sound]) { (granted, error) in
// Enable or disable features based on authorization.
}

I was told by QA that this is a known issue and was asked to submit this issue. Please let me know if you need any additional info from me. I don't have screenshots at this time, but I can get them if you want to see anything specific.

Mapbox Navigation SDK version:
0.38.0

@1ec5 1ec5 added the bug Something isn’t working label Nov 11, 2019
@1ec5
Copy link
Contributor

1ec5 commented Nov 11, 2019

Were the images oriented correctly in a previous version? #2206 added these icons based on factoring out the maneuver icon generation code used in CarPlay. That code calls UIImage.withHorizontallyFlippedOrientation(), which affects the UIImage.imageOrientation property but doesn’t affect the underlying pixel data. Maybe the lock screen isn’t honoring the UIImage.imageOrientation property?

@billyking991
Copy link
Author

I only recently added in notifications to my app, so I haven't tried it out on any other Mapbox SDK version. I've only tried it on 0.38.0. The images in the NavView are fine. It is the images in the notification that aren't correct (for left turns). I've only tested this on iOS 13 and don't have any devices still on iOS 12.

Is there a way I can check during testing to see if the lock screen isn't honoring the imageOrientation property. I'd be happy to run some tests tomorrow if you tell me what to look for...

@billyking991
Copy link
Author

Also, if you want me to revert to a previous Mapbox SDK for testing, please let me know what you want me to install. If it doesn't break too much stuff, I can give it a try.

@1ec5
Copy link
Contributor

1ec5 commented Nov 13, 2019

No need to test previous versions. I forgot that the notification in previous versions didn’t have an icon at all. We’re also using the same icon code in CarPlay, and it’s been working fine there.

A fix is in #2270.

@1ec5 1ec5 modified the milestones: v0.39.0, v0.38.1 Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants