Skip to content

Conversation

parfeon
Copy link
Contributor

@parfeon parfeon commented Sep 15, 2025

feat(logger): add new logger module

Replace the legacy logger with the new logger module with a bundled console logger with a unified (with other SDKs) logs output format.

BREAKING CHANGES: Legacy logger removed and logging to file disabled by default.

feat(logger): provide interface for custom loggers

Provide interfaces for custom logger implementation.

feat(here-now): add limit and offset parameters

Add 'limit' and 'offset' parameters for 'PNHereNowRequest' for pagination support.

feat(retry-policy): retry policy moved to the network module

Retry policy can be applied for all API endpoint groups (not only subscribe).

refactor(deprecated): removed packetSizeForOperation

Removed previously deprecated packetSizeForOperation methods group along with size builder from the PubNub client.

refactor(deprecated): removed retry from status object

Removed previously deprecated retry and cancelAutomaticRetry methods along with the automaticallyRetry property from API processing status objects.

BREAKING CHANGES: To retry the last API call, same request object to the corresponding method.

refactor(deprecated): removed obsolete properties from status and result objects.

Removed previously deprecated properties: TLSEnabled, authKey, origin, userID, uuid, and statusCode.

BREAKING CHANGES: Most of the removed values can be retrieved from the client configuration, and the API processing HTTP status code was removed in favor of category fields.

refactor(deprecated): removed deprecated configuration options

Removed previously deprecated uuid, deviceID, applicationExtensionSharedGroupIdentifier, and completeRequestsBeforeSuspension configuration options.

BREAKING CHANGES: uuid has been removed in favor of the userID property.

Replace the legacy logger with the new logger module with a bundled console logger with a unified
(with other SDKs) logs output format.

BREAKING CHANGES: Legacy logger removed and logging to file disabled by default.

feat(logger): provide interface for custom loggers

Provide interfaces for custom logger implementation.

feat(retry-policy): retry policy moved to the network module

Retry policy can be applied for all API endpoint groups (not only `subscribe`).

refactor(deprecated): removed `packetSizeForOperation`

Removed previously deprecated `packetSizeForOperation` methods group along with `size` builder from
the `PubNub` client.

refactor(deprecated): removed `retry` from status object

Removed previously deprecated `retry` and `cancelAutomaticRetry` methods along with
the `automaticallyRetry` property from API processing status objects.

BREAKING CHANGES: To retry the last API call, same request object to the corresponding method.

refactor(deprecated): removed obsolete properties from `status` and `result` objects.

Removed previously deprecated properties: `TLSEnabled`, `authKey`, `origin`, `userID`, `uuid`,
and `statusCode`.

BREAKING CHANGES: Most of the removed values can be retrieved from the client configuration,
and the API processing HTTP status code was removed in favor of `category` fields.

refactor(deprecated): removed deprecated configuration options

Removed previously deprecated `uuid`, `deviceID`, `applicationExtensionSharedGroupIdentifier`,
and `completeRequestsBeforeSuspension` configuration options.

BREAKING CHANGES: `uuid` has been removed in favor of the `userID` property.
@parfeon parfeon self-assigned this Sep 15, 2025
@parfeon parfeon added status: done This issue is considered resolved. priority: medium This PR should be reviewed after all high priority PRs. type: feature This PR contains new feature. type: refactor This PR contains refactored existing features. labels Sep 15, 2025
@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Sep 15, 2025

🎉 Snyk checks have passed. No issues have been found so far.

Add `limit` and `offset` parameters for `PNHereNowRequest` for pagination support.
Fix the issue where an immediate 'unsubscribe' after receiving a response from a subscription may
cause a race condition where the next 'subscribe' is in the process of scheduling and can't be
cancelled, causing 'leave' to time out.

fix(cocoapods): address classes visibility

Fix the issue because of which private classes leaked into public headers and the CocoaPod build
failed.
//
// PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
// Copyright (c) 2013 PubNub Inc.
// Copyright (c) 2013 PubNub Inc./Users/sergey/Documents/Develop/Objective-C/PubNub SDK (master)/PubNub.podspec
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that custom path has been accidentally inserted here

.macOS(.v10_11),
.tvOS(.v10),
.watchOS(.v4)
.iOS(.v14),
Copy link
Contributor

@jguz-pubnub jguz-pubnub Sep 18, 2025

Choose a reason for hiding this comment

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

I like that the deployment targets were increased, but I’m curious - was there a specific reason or change in this PR that required increasing them?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that deployment targets haven't been updated in the PubNub.podspec file as you did in Package.swift

}

- (void)channelsForGroup:(NSString *)group withCompletion:(PNGroupChannelsAuditCompletionBlock)block {
[self.logger warnWithLocation:@"PubNub" andMessageFactory:^PNLogEntry * {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we log deprecated method calls? The caller will already receive a warning message in the IDE (Xcode)

return [PNStringLogEntry entryWithMessage:@"Unsubscribe all channels and groups"];
}];

dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need dispatch_after here?

@jguz-pubnub
Copy link
Contributor

I have a general question: should we really add separate logs when a caller invokes a deprecated method? This occurs in many places, and the IDE should already provide a warning. I don't think this should be the logger mechanism's responsibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium This PR should be reviewed after all high priority PRs. status: done This issue is considered resolved. type: feature This PR contains new feature. type: refactor This PR contains refactored existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants