---
source_url: https://www.pubnub.com/docs/sdks/cocoa-swift/troubleshooting
title: Troubleshooting for Cocoa Swift SDK
updated_at: 2026-05-22T11:06:23.108Z
---

> 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


# Troubleshooting for Cocoa Swift SDK

This SDK has been replaced by a new PubNub Swift SDK written purely in Swift. Check it out [here](https://www.pubnub.com/docs/sdks/swift).

Use this code to enable logging:

```swift
self.client.logger.enabled = true
self.client.logger.setLogLevel(PNLogLevel.PNVerboseLogLevel.rawValue)
```

:::warning Logging in pre-4.5.0 versions
To enable logging before SDK version 4.5.0. You can use this: `PNLog.enabled(true)`
:::

## How to find the version of your SDK

To find your exact version, do one of the following:

* In your Xcode project, navigate to PubNub > Misc > PNConstants.h
* Or, to access it through code: 1let version = PubNub.information().version

## Sending logs to support

Use a tool such as `iExplorer` or Devices (in menu bar, Window > Devices) in Xcode to grab the logs from the `APPNAME/Documents` directory on your device, and include them in your support ticket.