summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2019-04-19 17:56:44 -0400
committerJulian Rex <julian.rex@mapbox.com>2019-04-24 11:21:00 -0400
commit3c5314793dec41988a8ba17bd53302cee92e2e3f (patch)
tree4d69965990096e29c26467e7db46c89903c4b068
parentf831d3e61152037acfa820fbbbeb11ccb8a56281 (diff)
downloadqtlocation-mapboxgl-3c5314793dec41988a8ba17bd53302cee92e2e3f.tar.gz
[ios] PR review tweaks.
-rw-r--r--platform/darwin/src/MGLAccountManager.m4
-rw-r--r--platform/darwin/src/http_file_source.mm6
2 files changed, 2 insertions, 8 deletions
diff --git a/platform/darwin/src/MGLAccountManager.m b/platform/darwin/src/MGLAccountManager.m
index 4904b13a9b..716950bd14 100644
--- a/platform/darwin/src/MGLAccountManager.m
+++ b/platform/darwin/src/MGLAccountManager.m
@@ -42,10 +42,6 @@ static BOOL _MGLAccountsSDKEnabled;
}
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
- if (accessToken.length) {
- self.accessToken = accessToken;
- }
-
// TODO: Use MGL_OBJC_DYNAMIC_CAST (that requires moving the macro, where it
// doesn't require a C++ header)
NSNumber *accountsSDKNumber = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMapboxAccountsSDKEnabled"];
diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm
index 7835f20559..c4b18ffd3c 100644
--- a/platform/darwin/src/http_file_source.mm
+++ b/platform/darwin/src/http_file_source.mm
@@ -216,10 +216,8 @@ std::unique_ptr<AsyncRequest> HTTPFileSource::request(const Resource& resource,
// Only add the token if we have enabled the accounts SDK
if (MGLAccountManager.isAccountsSDKEnabled)
{
- NSString *skuToken = MGLAccountManager.skuToken;
- if (skuToken) {
- [newQueryItems addObject:[NSURLQueryItem queryItemWithName:@"sku" value:skuToken]];
- }
+ NSCAssert(MGLAccountManager.skuToken, @"skuToken should be non-nil if the accounts SDK is enabled");
+ [newQueryItems addObject:[NSURLQueryItem queryItemWithName:@"sku" value:MGLAccountManager.skuToken]];
}
components.queryItems = components.queryItems ? [components.queryItems arrayByAddingObjectsFromArray:newQueryItems] : newQueryItems;