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.

Publicly expose NSPredicate-JSON conversion #11751

Closed

Description

@1ec5

Just as the iOS and macOS map SDKs expose conversion methods between NSExpression and JSON-like Foundation objects representing style specification expressions, they should also expose conversion methods between NSPredicate and JSON expressions. +[NSPredicate(MGLExpressionAdditions) mgl_predicateWithJSONObject:] and mgl_jsonExpressionObject have already been implemented, but they’re stuck in the private NSPredicate+MGLAdditions.h header:

+ (instancetype)mgl_predicateWithJSONObject:(id)object;
@property (nonatomic, readonly) id mgl_jsonExpressionObject;

Once #11610 lands, we should move the rest of that header into an MGLPrivateAdditions category inside NSPredicate+MGLPrivateAdditions.h and reserve the MGLAdditions category for just these two public symbols.

Among other things, this will make it possible for React Native Mapbox GL to work with layer filters.

/cc @fabian-guerra @nitaliano @lucaswoj

Activity

  1. added
    iOS
    macOS
    on Apr 20, 2018
  2. added this to the ios-v4.0.1 milestone on Apr 20, 2018
  3. 1ec5 commented on Apr 27, 2018

    @1ec5
    ContributorAuthor

    +[NSPredicate(MGLExpressionAdditions) mgl_predicateWithJSONObject:] should be renamed +predicateWithMGLJSONObject:, along the lines of #11612.

  4. fabian-guerra commented on May 4, 2018

    @fabian-guerra
    Contributor

    Fixed in #11810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    iOSmacOSrefactorruntime styling

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions