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

Add telemetry events #304

Merged
merged 92 commits into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
3215921
Begin adding telem events
Jun 15, 2017
4f85bdf
fix
Jun 22, 2017
530ae77
add timezone
Jun 22, 2017
cff594f
Update
Jun 23, 2017
3b05ad0
Add remaining events
Jun 23, 2017
6fa8b98
conditional import
Jun 23, 2017
8b61ab9
Move back to core
Jun 23, 2017
a1ac9cd
make private
Jun 23, 2017
4170144
Consolidate telemetry state, outline full telemetry spec
ericrwolfe Jun 26, 2017
7c19139
Update date format
ericrwolfe Jun 28, 2017
ae3606f
Store more state; add device
ericrwolfe Jun 28, 2017
582801f
Updated telemetry event handling
ericrwolfe Jun 28, 2017
e9ab2d3
Round events
ericrwolfe Jun 29, 2017
c48a740
Add dialog view controller
frederoni Jun 29, 2017
98f1e78
Reset telemetry session if route updated after arrival
ericrwolfe Jun 29, 2017
d3f70ac
Remove logs; trailing closure syntax
ericrwolfe Jun 29, 2017
a207c3e
Add userId to feedback event
ericrwolfe Jun 29, 2017
35ef0c5
Hide feedback dialog after 0.5s
ericrwolfe Jun 29, 2017
b2305b7
Moar trailing closure
ericrwolfe Jun 29, 2017
c07dc9c
Add temporary pod dependency on Mapbox-iOS-SDK
ericrwolfe Jun 29, 2017
5021c6c
Pass nil feedback description for now
ericrwolfe Jun 29, 2017
a445dd5
Extend locations collected
ericrwolfe Jun 30, 2017
8d6dcbd
Fix location serialization
ericrwolfe Jun 30, 2017
e83e0c9
Reduce locations collected
ericrwolfe Jul 1, 2017
3fab48f
More battery level precision
ericrwolfe Jul 1, 2017
82577e2
remove battery enable flag
Jul 5, 2017
3dc4b66
Merge branch 'master' into telem
Jul 7, 2017
650aa53
Add snapshot to reroute event
frederoni Jul 7, 2017
7bf9429
Add update + cancel feedback functions
ericrwolfe Jul 7, 2017
51b419b
Screenshots as jpeg
ericrwolfe Jul 7, 2017
5f7fb85
Fixed bugs in closestCoordinate and addArrow functions. (#284)
hardsetting Jul 7, 2017
872a078
Fix location permissions and adopt iOS 11 description
frederoni Jul 7, 2017
19d8004
Wait until style has loaded before doing things to it (#339)
Jul 7, 2017
00a9e70
Defer simulated location updates until next run loop (#344)
ericrwolfe Jul 7, 2017
88292e6
Did arrive once (#347)
Jul 7, 2017
723ffe3
Merge branch 'master' into telem
Jul 7, 2017
8c331f6
Merge branch 'master' into telem
Jul 7, 2017
27a92b3
add back
Jul 7, 2017
6268d1e
Merge branch 'master' into telem
Jul 10, 2017
1ca06a3
Use telem library
Jul 10, 2017
ec4d0c8
add init
Jul 10, 2017
752a434
add
Jul 10, 2017
094dc75
add release
Jul 11, 2017
9090a7d
Merge branch 'master' into telem
Jul 11, 2017
d916e79
fix string
Jul 11, 2017
0ab1844
Merge branch 'master' into telem
Jul 11, 2017
bb7a0a1
updater
Jul 12, 2017
689ad01
fix
Jul 12, 2017
270667f
update args
Jul 13, 2017
3ab3f60
add framework
Jul 13, 2017
1facf0d
add certs
Jul 13, 2017
dd9e1a3
move certs
Jul 13, 2017
afebe4e
struct
Jul 14, 2017
f215025
more struct
Jul 14, 2017
c7f94ba
add
Jul 14, 2017
b0a518f
add to tests
Jul 14, 2017
caee403
add to obj-c
Jul 14, 2017
733d113
Merge branch 'master' into telem
Jul 14, 2017
1af385c
Merge branch 'master' into telem
Jul 14, 2017
50f4621
remove
Jul 14, 2017
e73102b
update
Jul 14, 2017
efba1ef
bump
Jul 15, 2017
54eecec
Merge branch 'master' into telem
Jul 15, 2017
a0f12ee
Add upcoming step information
ericrwolfe Jul 15, 2017
fa2a1c5
Remove telem staging token check (handled upstream)
ericrwolfe Jul 15, 2017
be98692
Add previous step information
ericrwolfe Jul 15, 2017
93f9584
Only capitalize first character of step maneuver keys
ericrwolfe Jul 15, 2017
97467ea
copy framework
Jul 17, 2017
ca8d37b
trailing
Jul 17, 2017
3bbf17c
add framework
Jul 17, 2017
f183ab5
add access token
Jul 17, 2017
783de5d
fix
Jul 17, 2017
94ead77
make optional
Jul 17, 2017
0c1a57f
rename
Jul 17, 2017
e8d1c55
update event lib
Jul 17, 2017
982eefa
Merge branch 'master' into telem
Jul 17, 2017
adf4bed
name not version
Jul 17, 2017
12a51b4
Better types
Jul 17, 2017
24440b5
Merge branch 'master' into telem
Jul 18, 2017
3d5b8ef
Update
Jul 19, 2017
d72d8b3
No telem in sim
Jul 19, 2017
a013625
add back
Jul 19, 2017
cd42c00
Dont pass in access token
Jul 19, 2017
c90e03e
fix
Jul 19, 2017
90b18a9
Switch to nested step dictionary in feedback events
ericrwolfe Jul 19, 2017
621c2f4
Add debug metrics user info key
ericrwolfe Jul 19, 2017
572cde4
Fix feedback event types
ericrwolfe Jul 19, 2017
e04bb09
Moved all event dictionary generation to MMEEventsManager
ericrwolfe Jul 20, 2017
bf2e536
Move feedback event dict update logic
ericrwolfe Jul 20, 2017
1a07311
Bump
Jul 20, 2017
5dec73b
Merge branch 'master' into telem
ericrwolfe Jul 21, 2017
a7b8e1a
Pin to MapboxDirections.swift 0.10.1
ericrwolfe Jul 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cartfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ github "52inc/Pulley" ~> 1.3.1
github "rs/SDWebImage" ~> 4.0
github "Project-OSRM/osrm-text-instructions.swift" ~> 0.2.0
github "frederoni/aws-sdk-ios" "40c7d5d60e0b80d70cd1502ef0cf8507f023f8d5"
github "mapbox/mapbox-telemetry-ios" ~> 0.2
1 change: 1 addition & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ github "Project-OSRM/osrm-text-instructions.swift" "v0.2.0"
github "facebook/ios-snapshot-test-case" "2.1.4"
github "frederoni/aws-sdk-ios" "40c7d5d60e0b80d70cd1502ef0cf8507f023f8d5"
github "mapbox/MapboxDirections.swift" "v0.10.0"
github "mapbox/mapbox-telemetry-ios" "v0.2.5"
github "raphaelmor/Polyline" "v4.1.1"
github "rs/SDWebImage" "4.0.0"
129 changes: 6 additions & 123 deletions Examples/Swift/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="68P-Cf-VxO">
<rect key="frame" x="157.5" y="587" width="60" height="60"/>
<rect key="frame" x="158" y="587" width="60" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="LOt-aV-LJs"/>
Expand Down Expand Up @@ -188,7 +188,7 @@
<rect key="frame" x="16" y="35" width="343" height="125"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="⬆️" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qyT-xF-RHp">
<rect key="frame" x="37" y="38.5" width="45" height="48"/>
<rect key="frame" x="37" y="39" width="45" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="1pV-Xa-khq"/>
<constraint firstAttribute="width" constant="45" id="E7i-pe-mOP"/>
Expand All @@ -200,99 +200,21 @@
<fragment content="DO NOT TRANSLATE">
<attributes>
<font key="NSFont" size="11" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
<textTab alignment="left" location="28">
<options/>
</textTab>
<textTab alignment="left" location="56">
<options/>
</textTab>
<textTab alignment="left" location="84">
<options/>
</textTab>
<textTab alignment="left" location="112">
<options/>
</textTab>
<textTab alignment="left" location="140">
<options/>
</textTab>
<textTab alignment="left" location="168">
<options/>
</textTab>
<textTab alignment="left" location="196">
<options/>
</textTab>
<textTab alignment="left" location="224">
<options/>
</textTab>
<textTab alignment="left" location="252">
<options/>
</textTab>
<textTab alignment="left" location="280">
<options/>
</textTab>
<textTab alignment="left" location="308">
<options/>
</textTab>
<textTab alignment="left" location="336">
<options/>
</textTab>
</tabStops>
</paragraphStyle>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO"/>
</attributes>
</fragment>
</attributedString>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="15" translatesAutoresizingMaskIntoConstraints="NO" id="7g2-Jm-pgj">
<rect key="frame" x="92" y="44.5" width="243" height="36"/>
<rect key="frame" x="92" y="45" width="243" height="36"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="30"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<attributedString key="userComments">
<fragment content="DO NOT TRANSLATE">
<attributes>
<font key="NSFont" size="11" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
<textTab alignment="left" location="28">
<options/>
</textTab>
<textTab alignment="left" location="56">
<options/>
</textTab>
<textTab alignment="left" location="84">
<options/>
</textTab>
<textTab alignment="left" location="112">
<options/>
</textTab>
<textTab alignment="left" location="140">
<options/>
</textTab>
<textTab alignment="left" location="168">
<options/>
</textTab>
<textTab alignment="left" location="196">
<options/>
</textTab>
<textTab alignment="left" location="224">
<options/>
</textTab>
<textTab alignment="left" location="252">
<options/>
</textTab>
<textTab alignment="left" location="280">
<options/>
</textTab>
<textTab alignment="left" location="308">
<options/>
</textTab>
<textTab alignment="left" location="336">
<options/>
</textTab>
</tabStops>
</paragraphStyle>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO"/>
</attributes>
</fragment>
</attributedString>
Expand All @@ -306,46 +228,7 @@
<fragment content="DO NOT TRANSLATE">
<attributes>
<font key="NSFont" size="11" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
<textTab alignment="left" location="28">
<options/>
</textTab>
<textTab alignment="left" location="56">
<options/>
</textTab>
<textTab alignment="left" location="84">
<options/>
</textTab>
<textTab alignment="left" location="112">
<options/>
</textTab>
<textTab alignment="left" location="140">
<options/>
</textTab>
<textTab alignment="left" location="168">
<options/>
</textTab>
<textTab alignment="left" location="196">
<options/>
</textTab>
<textTab alignment="left" location="224">
<options/>
</textTab>
<textTab alignment="left" location="252">
<options/>
</textTab>
<textTab alignment="left" location="280">
<options/>
</textTab>
<textTab alignment="left" location="308">
<options/>
</textTab>
<textTab alignment="left" location="336">
<options/>
</textTab>
</tabStops>
</paragraphStyle>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO"/>
</attributes>
</fragment>
</attributedString>
Expand Down
1 change: 1 addition & 0 deletions Examples/Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class ViewController: UIViewController, MGLMapViewDelegate {
exampleMode = .default

let navigationViewController = NavigationViewController(for: route, locationManager: locationManager())
navigationViewController.showsReportFeedback = true
navigationViewController.navigationDelegate = self

present(navigationViewController, animated: true, completion: nil)
Expand Down
1 change: 1 addition & 0 deletions MapboxCoreNavigation.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ Pod::Spec.new do |s|

s.dependency "MapboxDirections.swift", "~> 0.10.0"
s.dependency "OSRMTextInstructions", "~> 0.2.0"
s.dependency "MapboxMobileEvents", "~> 0.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does MapboxNavigation-Documentation.podspec need to be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


end
9 changes: 9 additions & 0 deletions MapboxCoreNavigation/Date.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extension Date {
var ISO8601: String {
Copy link
Contributor

Choose a reason for hiding this comment

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

Too bad ISO8601DateFormatter is only in iOS 10.0 and above.

let formatter = DateFormatter()
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
formatter.timeZone = TimeZone(secondsFromGMT: 0)
return formatter.string(from: self)
}
}
24 changes: 24 additions & 0 deletions MapboxCoreNavigation/Feedback.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Foundation

@objc(MBFeedbackType)
public enum FeedbackType: Int, CustomStringConvertible {
case general

public init?(description: String) {
let level: FeedbackType
switch description {
case "general":
level = .general
default:
return nil
}
self.init(rawValue: level.rawValue)
}

public var description: String {
switch self {
case .general:
return "general"
}
}
}
Loading