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

Using initWithLayerIdentifier: with MGL*StyleLayer throws exception #6250

Closed

Description

@boundsj

All MGL style layer classes (i.e. MGLBackgroundStyleLayer) implement the MGLStyleLayer protocol. That protocol declares both -[MGLStyleLayer initWithLayerIdentifier:] and -[MGLStyleLayer initWithLayerIdentifier:sourceIdentifier:] as optional.

If a developer initializes an MGLBackgroundStyleLayer (or any other) with just a layer identifier, their application will compile but crash at runtime if that code path is exercised. We should make the init methods non-optional or at least implement -[MGLStyleLayer initWithLayerIdentifier:] in all of the MGL style layer classes.

@1ec5 @frederoni

Activity

  1. added
    iOS
    beta blocker
    on Sep 5, 2016
  2. added this to the ios-v3.4.0 milestone on Sep 5, 2016
  3. self-assigned this
    on Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

beta blockercrashiOSruntime styling

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions