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

Commit 4d3f390

Browse files
committed
Move check to +[MGLMapView initialize]
1 parent 470c6c0 commit 4d3f390

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

platform/ios/src/MGLMapView.mm

+8-2
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,14 @@ - (instancetype)initWithCoder:(nonnull NSCoder *)decoder
348348
return self;
349349
}
350350

351+
+ (void)initialize
352+
{
353+
if (self == [MGLMapView self])
354+
{
355+
[MGLSDKUpdateChecker checkForUpdates];
356+
}
357+
}
358+
351359
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingStyle
352360
{
353361
return [NSSet setWithObject:@"styleURL"];
@@ -565,8 +573,6 @@ - (void)commonInit
565573
if ([UIApplication sharedApplication].applicationState != UIApplicationStateBackground) {
566574
[MGLMapboxEvents pushEvent:MGLEventTypeMapLoad withAttributes:@{}];
567575
}
568-
569-
[MGLSDKUpdateChecker checkForUpdates];
570576
}
571577

572578
- (mbgl::Size)size

0 commit comments

Comments
 (0)