FAQ for Objective-C SDK

Check out the frequently asked questions about the PubNub Objective-C SDK.

Why is a user ID required?

The user ID uniquely identifies the client (end user, device, or server). Set and persist a stable value for the lifetime of the user or device; without it, the client cannot connect.

How do I enable Transport Layer Security (TLS)?

Enable TLS in your networking stack so all communications with PubNub are encrypted in transit.

Why am I not receiving messages after subscribing?

Messages published before the subscribe call are not delivered by default. Ensure your app subscribes before publishing, or use history to retrieve previous messages when applicable.

Which encryption should I use?

Prefer 256‑bit AES‑CBC using the AESCBCCryptoModule. The legacy option with 128‑bit keys remains available for backward compatibility.

Why does encryption use AES-128 when cryptoModule is configured?

If a method accepts a direct cipher key (for example, encrypt:withKey: or decrypt:withKey:), passing that key overrides the configured cryptoModule for that single operation and uses legacy Advanced Encryption Standard (AES) with 128‑bit keys. Omit the direct key and use the configured AESCBCCryptoModule to apply AES‑256‑CBC. For partial encryption, create and use a separate cryptoModule instance where needed.

For details, refer to Crypto module configuration.

Last updated on