Skip to content

feat(spm): add Swift Package Manager build support#469

Open
parfeon wants to merge 3 commits intomasterfrom
feature/spm-support-and-tests
Open

feat(spm): add Swift Package Manager build support#469
parfeon wants to merge 3 commits intomasterfrom
feature/spm-support-and-tests

Conversation

@parfeon
Copy link
Contributor

@parfeon parfeon commented Mar 3, 2026

feat(spm): add Swift Package Manager build support

Generate public header symlinks in include/PubNub/ using the export_for_spm.sh script with public-only mode, configure Package.swift with header search paths and fix internal imports that relied on umbrella header transitivity.

fix(presence): enforce channel and group uniqueness

Replace NSMutableArray with NSMutableSet in PNHeartbeat manager and add NSSet-based deduplication in PNSubscribeRequest and PNPresenceHeartbeatRequest initializers to prevent duplicate channel and channel group entries.

feat(tests): add comprehensive unit test suite

Add unit tests for concurrency, requests, helpers, models, crypto modules, logger, and network reachability along with error handling and subscribe channel uniqueness tests.

Generate public header symlinks in `include/PubNub/` using the `export_for_spm.sh` script with
`public-only` mode, configure `Package.swift` with header search paths and fix internal imports
that relied on umbrella header transitivity.

fix(presence): enforce channel and group uniqueness

Replace `NSMutableArray` with `NSMutableSet` in `PNHeartbeat` manager and add `NSSet`-based
deduplication in `PNSubscribeRequest` and `PNPresenceHeartbeatRequest` initializers to prevent
duplicate channel and channel group entries.

feat(tests): add comprehensive unit test suite

Add unit tests for concurrency, requests, helpers, models, crypto modules, logger, and network
reachability along with error handling and subscribe channel uniqueness tests.
@parfeon parfeon self-assigned this Mar 3, 2026
@parfeon parfeon added priority: medium This PR should be reviewed after all high priority PRs. type: fix This PR contains fixes to existing features. type: test This PR contains new tests for existing functionality or fixes to existing tests. labels Mar 3, 2026
@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Mar 3, 2026

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

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@parfeon parfeon marked this pull request as ready for review March 3, 2026 09:45
@parfeon parfeon requested a review from jguz-pubnub as a code owner March 3, 2026 09:45
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. type: fix This PR contains fixes to existing features. type: test This PR contains new tests for existing functionality or fixes to existing tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants