Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Use staging server in simulator #4726

Merged
merged 3 commits into from
Apr 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Mapbox welcomes participation and contributions from everyone. If you’d like
- Fixed an issue preventing KVO change notifications from being generated on MGLMapView’s `userTrackingMode` key path when `-setUserTrackingMode:animated:` is called. ([#4724](https://github.com/mapbox/mapbox-gl-native/pull/4724))
- Added a `-reloadStyle:` action to MGLMapView to force a reload of the current style. ([#4728](https://github.com/mapbox/mapbox-gl-native/pull/4728))
- A more specific user agent string is now sent with style and tile requests. ([#4012](https://github.com/mapbox/mapbox-gl-native/pull/4012))
- Mapbox Telemetry is automatically disabled while the host application is running in the iOS Simulator. ([#4726](https://github.com/mapbox/mapbox-gl-native/pull/4726))
- Removed unused SVG files from the SDK’s resource bundle. ([#4641](https://github.com/mapbox/mapbox-gl-native/pull/4641))
- Deprecated `-[MGLMapView emptyMemoryCache]`. ([#4725](https://github.com/mapbox/mapbox-gl-native/pull/4725))

Expand Down
11 changes: 0 additions & 11 deletions platform/ios/app/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
<string>7877</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>cloudfront-staging.tilestream.net</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>© 2014–2016 Mapbox</string>
<key>NSLocationAlwaysUsageDescription</key>
Expand Down
1 change: 0 additions & 1 deletion platform/ios/app/MBXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ + (void)initialize
@"MBXUserTrackingMode": @(MGLUserTrackingModeNone),
@"MBXShowsUserLocation": @NO,
@"MBXDebug": @NO,
@"MGLTelemetryTestServerURL": @"https://cloudfront-staging.tilestream.net",
}];
}
}
Expand Down
8 changes: 6 additions & 2 deletions platform/ios/src/MGLMapboxEvents.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,12 @@ + (void)initialize {
}

+ (BOOL)isEnabled {
#if TARGET_OS_SIMULATOR
return NO;
#else
return ([[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsEnabled"] &&
[[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0);
#endif
}

- (BOOL)debugLoggingEnabled {
Expand Down Expand Up @@ -360,7 +364,7 @@ - (void)pushEvent:(NSString *)event withAttributes:(MGLMapboxEventAttributes *)a
[self pushTurnstileEvent];
}

if ([self isPaused]) {
if (self.paused) {
return;
}

Expand Down Expand Up @@ -450,7 +454,7 @@ - (MGLMapboxEventAttributes *)eventForAttributes:(MGLMutableMapboxEventAttribute
// Called implicitly from public use of +flush.
//
- (void)postEvents:(NS_ARRAY_OF(MGLMapboxEventAttributes *) *)events {
if ([self isPaused]) {
if (self.paused) {
return;
}

Expand Down
2 changes: 0 additions & 2 deletions platform/ios/uitest/App-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
<string>pk.eyJ1IjoianVzdGluIiwiYSI6Ik9RX3RRQzAifQ.dmOg_BAp1ywuDZMM7YsXRg</string>
<key>MGLMapboxMetricsEnabledSettingShownInApp</key>
<true/>
<key>MGLMetricsTestServerURL</key>
<string>https://cloudfront-staging.tilestream.net</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Strictly for testing purposes, promise!</string>
<key>UILaunchStoryboardName</key>
Expand Down