C-Core SDK 6.0.0 migration guide
This guide summarizes the differences between pre-6.0.0 versions and 6.0.0 and shows how to migrate to C-Core SDK 6.0.0.
C-Core SDK version 6.0.0 adds pagination support to the Here Now API through new limit and offset fields on pubnub_here_now_options. This applies to all C-Core SDK flavors: C-Core, POSIX C, POSIX C++, Windows C, Windows C++, FreeRTOS, and Mbed.
No pre-6.0.0 support
If your application uses C-Core SDK pre-6.0.0, it continues to work. We recommend migrating to C-Core 6.0.0 to access new features and improvements. Pre-6.0.0 versions receive only critical security fixes.
What has changed
See the major differences between versions:
| Feature | C-Core SDK pre-6.0.0 | C-Core SDK 6.0.0 |
|---|---|---|
pubnub_here_now_options struct | Fields: channel_group, disable_uuids, state | Added: limit (1–1000), offset (pagination) |
pubnub_here_now_defopts() defaults | {NULL, false, false} | {NULL, false, false, 1000, 0} |
Breaking changes
Here Now API
Starting with 6.0.0, the pubnub_here_now_options struct in core/pubnub_coreapi_ex.h gained two new fields for pagination support.
Struct changes
struct pubnub_here_now_options {
char const* channel_group;
bool disable_uuids;
bool state;
unsigned limit; /* NEW — max users to return (1–1000) */
unsigned offset; /* NEW — pagination offset */
};
Default value changes
pubnub_here_now_defopts() now returns:
| Field | C-Core SDK pre-6.0.0 | C-Core SDK 6.0.0 |
|---|---|---|
channel_group | NULL | NULL (unchanged) |
disable_uuids | false | false (unchanged) |
state | false | false (unchanged) |
limit | N/A | 1000 |
offset | N/A | 0 |
- Before (pre-6.0.0)
- After (6.0.0)
/* Simple here_now call — no pagination available */
struct pubnub_here_now_options opts = pubnub_here_now_defopts();
pubnub_here_now_ex(pb, "my-channel", opts);
/* Use new pagination fields */
struct pubnub_here_now_options opts = pubnub_here_now_defopts();
opts.limit = 100; /* Return at most 100 users */
opts.offset = 200; /* Skip first 200 users */
pubnub_here_now_ex(pb, "my-channel", opts);
Migration steps
To migrate to C-Core SDK 6.0.0:
-
Update your SDK to version
6.0.0. -
Review Here Now API usage:
Action Description If you use pubnub_here_now_ex()with custom options, the struct now includeslimitandoffsetfieldsAlways use pubnub_here_now_defopts()to initialize options. The new fields default tolimit=1000andoffset=0, which preserves existing behavior.If your channels have more than 1,000 occupants, implement pagination logic Use the limitandoffsetfields to paginate through results. -
Recompile your project. The struct size has changed, so all compilation units using
pubnub_here_now_optionsmust be rebuilt. -
Test your application. Pay special attention to presence operations.
Additional resources
For API details, see the C-Core SDK documentation. For questions or issues, contact PubNub support.