Skip to content

Use API Availability Checks instead of PF_UNAVAILABLE_WARNING #1788

Open
@JohnCaccavale

Description

@JohnCaccavale

Issue Description

Some classes and API are unavailable for all platforms. In some cases, to indicate a particular class is unavailable, various macros are used such as PF_OSX_UNAVAILABLE_WARNING, PF_TV_UNAVAILABLE_WARNING, PF_WATCH_UNAVAILABLE_WARNING, etc.

This unfortunately results in unnecessary warnings in the Xcode Issue Navigator even if a client project makes no use of those API.

Screenshot 2024-05-04 at 5 35 18 PM

Rather than generating these warnings, these macros should be removed in favor of @available API checks.

Steps to reproduce

  • Create a macOS project and add the latest Parse SDK as a dependency via Swift Package Manager.
  • Upon building the macOS project, the warnings appear in the issue navigator.

Actual Outcome

  • Warnings appear in the issue navigator that need not to occur.

Expected Outcome

  • If not utilizing unavailable API, there should be no project warnings.

Environment

  • ParseObjc Version 3.0.0
  • Xcode Version 15.3 (15E204a)

Client

  • Parse ObjC SDK version: 3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions