This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Crash on startup in Simulator — -[MGLMapboxEventsData init] #2687
Milestone
Comments
1ec5
added
iOS
Mapbox Maps SDK for iOS
crash
telemetry
Integration with Mapbox Telemetry libraries
labels
Oct 20, 2015
Also #2683 |
For reasons unknown to me, the simulator always runs the conditional CoreTelephony code, whether or not CoreTelephony is linked. It should never need this code, either way. This'll fix it, but it's not a cure: diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index bc6dfb0..9769e07 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -78,7 +78,8 @@ const NSTimeInterval MGLFlushInterval = 60;
// Collect cellular carrier data if CoreTelephony is linked
Class CTTelephonyNetworkInfo = NSClassFromString(@"CTTelephonyNetworkInfo");
- if (CTTelephonyNetworkInfo) {
+ if (CTTelephonyNetworkInfo && !TARGET_IPHONE_SIMULATOR) {
id telephonyNetworkInfo = [[CTTelephonyNetworkInfo alloc] init];
SEL subscriberCellularProviderSelector = NSSelectorFromString(@"subscriberCellularProvider"); |
Hrm, this is likely to fail on tvOS, too, if it has to do with |
friedbunny
added a commit
that referenced
this issue
Oct 21, 2015
AndwareSsj
pushed a commit
to AndwareSsj/mapbox-gl-native
that referenced
this issue
Nov 6, 2015
AndwareSsj
pushed a commit
to AndwareSsj/mapbox-gl-native
that referenced
this issue
Nov 6, 2015
Reverts mapbox#2691, which only fixed simulator crashing. Refs mapbox#2687
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
#2581 introduced a crash on startup in the iPhone 6s Simulator.
carrierVendor
is nil but is being dereferenced:/cc @friedbunny
The text was updated successfully, but these errors were encountered: