@@ -93,7 +93,6 @@ void cancel() {
9393
9494 NSURLSession * session = nil ;
9595 NSString * userAgent = nil ;
96- NSInteger accountType = 0 ;
9796
9897private:
9998 NSString * getUserAgent () const ;
@@ -196,12 +195,11 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
196195}
197196
198197MGL_APPLE_EXPORT
199- NSURL *resourceURLWithAccountType (const Resource& resource, NSInteger accountType ) {
198+ NSURL *resourceURL (const Resource& resource) {
200199
201200 NSURL *url = [NSURL URLWithString: @(resource.url.c_str ())];
202-
203- #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
204- if (accountType == 0 && isValidMapboxEndpoint (url)) {
201+
202+ if (isValidMapboxEndpoint (url)) {
205203 NSURLComponents *components = [NSURLComponents componentsWithURL: url resolvingAgainstBaseURL: NO ];
206204 NSMutableArray *queryItems = [NSMutableArray array ];
207205
@@ -219,9 +217,6 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
219217 components.queryItems = queryItems;
220218 url = components.URL ;
221219 }
222- #else
223- (void )accountType;
224- #endif
225220 return url;
226221}
227222
@@ -230,7 +225,7 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
230225 auto shared = request->shared ; // Explicit copy so that it also gets copied into the completion handler block below.
231226
232227 @autoreleasepool {
233- NSURL *url = resourceURLWithAccountType (resource, impl-> accountType );
228+ NSURL *url = resourceURL (resource);
234229 [MGLNativeNetworkManager.sharedManager debugLog: @" Requesting URI: %@ " , url.relativePath];
235230
236231 NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL: url];
0 commit comments