Repository navigation
CarPlay events. - #64
Conversation
| if ([name hasPrefix:MMEventCarplayPrefix]) { | ||
| NSString *timestamp = [self.dateWrapper formattedDateStringForDate:[self.dateWrapper date]]; | ||
| NSMutableDictionary *attributesWithTimestamp = [@{MMEEventKeyCreated: timestamp} mutableCopy]; | ||
| [attributesWithTimestamp addEntriesFromDictionary:attributes]; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| NSMutableDictionary *attributesWithTimestamp = [@{MMEEventKeyCreated: timestamp} mutableCopy]; | ||
| [attributesWithTimestamp addEntriesFromDictionary:attributes]; | ||
|
|
||
| event = [MMEEvent carplayEventWithName:name attributes:attributesWithTimestamp]; |
There was a problem hiding this comment.
nit: looks like an extra space between = and [MMEEvent`
|
@rclee reverted the date attribute field. ✅ |
Provided events to permit carplay related telemetry data.