Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

CarPlay events. - #64

Merged
vincethecoder merged 3 commits into
masterfrom
kobe/carplay-telemetry-events
Aug 30, 2018
Merged

vincethecoder merged 3 commits into
masterfrom
kobe/carplay-telemetry-events

Conversation

@vincethecoder

Copy link
Copy Markdown
Contributor

Provided events to permit carplay related telemetry data.

@vincethecoder
vincethecoder requested a review from rclee August 27, 2018 20:23
rclee
rclee previously approved these changes Aug 27, 2018

@rclee rclee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

Comment thread MapboxMobileEvents/MMEEventsManager.m Outdated
if ([name hasPrefix:MMEventCarplayPrefix]) {
NSString *timestamp = [self.dateWrapper formattedDateStringForDate:[self.dateWrapper date]];
NSMutableDictionary *attributesWithTimestamp = [@{MMEEventKeyCreated: timestamp} mutableCopy];
[attributesWithTimestamp addEntriesFromDictionary:attributes];

@rclee rclee Aug 29, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the conditional's logic limited to setting the appropriate event. For setting the timestamp in the attributes, that should be done in the SDK that's making use of carplay along with any other attributes needed (using the carplayEventWithName: attributes: method). If that is less desirable then you could also add created to the constructor like this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this again.. I'd prefer if we could stick with the first method of adding created timestamp in the client SDK if at all possible. EventsSDK should have as little knowledge of the events as possible.

Comment thread MapboxMobileEvents/MMEEventsManager.m Outdated
NSMutableDictionary *attributesWithTimestamp = [@{MMEEventKeyCreated: timestamp} mutableCopy];
[attributesWithTimestamp addEntriesFromDictionary:attributes];

event = [MMEEvent carplayEventWithName:name attributes:attributesWithTimestamp];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: looks like an extra space between = and [MMEEvent`

@vincethecoder

Copy link
Copy Markdown
Contributor Author

@rclee reverted the date attribute field. ✅

@vincethecoder
vincethecoder merged commit 1078af3 into master Aug 30, 2018
@rclee
rclee deleted the kobe/carplay-telemetry-events branch February 12, 2020 22:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants