Skip to content

Commit

Permalink
Make APNSError.reason public again (#174)
Browse files Browse the repository at this point in the history
This commit restores public access to the `APNSError.reason` property,
because it's needed for library users handling APNs errors.  (The status
code is not an viable alternative, as there are multiple different error
reasons for one status code.)

The `reason` property was unintentionally set to private in commit
ecf0f44 (Breakout APNSwift into packages (#170)). Notably, the
associated type ErrorReason remained public.
  • Loading branch information
vojtarylko authored Apr 11, 2023
1 parent 0bb74ee commit 22b2d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/APNSCore/APNSError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public struct APNSError: Error {
public let apnsID: UUID?

/// The error code indicating the reason for the failure.
private let reason: ErrorReason?
public let reason: ErrorReason?

/// The date at which APNs confirmed the token was no longer valid for the topic.
///
Expand Down

1 comment on commit 22b2d43

@ihamadfuad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need this in 5.0.0-beta.5 please

Please sign in to comment.