---
source_url: https://www.pubnub.com/docs/sdks/swift/faq
title: FAQ for Swift Native SDK
updated_at: 2026-06-01T12:05:58.656Z
sdk_name: PubNub Swift SDK
sdk_version: 10.1.6
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# FAQ for Swift Native SDK

PubNub Swift SDK, use the latest version: 10.1.6

Install:

```bash
Add PubNub via Swift Package Manager or CocoaPods@10.1.6
```

## Why are there two subscribe methods?

The Swift SDK supports a modern, entity-based flow and retains a legacy `subscribe(...)` for backward compatibility.

Use the modern flow documented in [Subscribe](https://www.pubnub.com/docs/sdks/swift/api-reference/publish-and-subscribe#subscribe). It creates a `Subscription` or a `SubscriptionSet`, uses an event listener API, and can resume from a timetoken with `subscribe(with:)`. The legacy `subscribe(to:and:at:withPresence:)` is documented in [Subscribe (old)](https://www.pubnub.com/docs/sdks/swift/api-reference/publish-and-subscribe#subscribe-old) and remains for existing applications.

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

Passing a direct cipher key to a method (where available) overrides the configured `cryptoModule` for that operation and uses legacy Advanced Encryption Standard (AES) with 128-bit keys. Remove the direct key argument to use the `cryptoModule` configuration (AES‑256‑CBC), or configure a separate `cryptoModule` instance for partial encryption scenarios.

For details, refer to [Crypto module configuration](https://www.pubnub.com/docs/sdks/swift/api-reference/configuration#cryptomodule).

## Terms in this document

* **Entity** - A subscribable object within a PubNub SDK that allows you to perform context-specific operations.
* **Listener** - A function or objectthat reacts to events or messages, like new chat messages or connection updates, letting your app respond in real-time.
* **Timetoken** - A unique identifier for each message that represents the number of 100-nanosecond intervals since January 1, 1970, for example, 16200000000000000.