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.

Refine methods for Swift #5178

@1ec5

Description

@1ec5

For the most part, the method names we’ve chosen in Objective-C make sense in Swift as well. However, there are some cases where the method name feels more verbose than usual, especially when the name describes a parameter’s type in addition to its role.

We should audit the entire API for opportunities to make Swift code read better. Now that realm/jazzy#136 has made it into our build system, we can annotate APIs with NS_SWIFT_NAME where they provide some measure of relief for Swift coders. For example, in #5110, visibleFeaturesAtPoint(_:inStyleLayersWithIdentifiers:) becomes visibleFeatures(at:styleLayerIdentifiers:), consistent with the Swift API design guidelines.

Considering the widespread changes that will be made to Foundation class naming in Swift 3, we should take care of this work around the time people are upgrading to the upcoming release of Xcode, so our changes won’t be breaking changes relative to the language itself.

/cc @friedbunny @boundsj @tmcw

Metadata

Metadata

Assignees

No one assigned

    Labels

    SwiftSpecific to the Swift/Objective-C bridge on iOS or macOSarchivedArchived because of inactivityiOSMapbox Maps SDK for iOSmacOSMapbox Maps SDK for macOSrefactor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions