---
title: publicCloudDatabase
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckcontainer/publicclouddatabase
---

# publicCloudDatabase

The app’s public database.

## Declaration

```swift
var publicCloudDatabase: CKDatabase { get }
```

## Discussion

Discussion This database is available regardless of whether the user’s device has an iCloud account. The contents of the public database are readable by all users of the app, and users have write access to the records, and other objects, they create. The public database’s contents are visible in the developer portal, where you can assign roles to users and restrict access as necessary. Data in the public database counts toward your app’s iCloud storage quota.

## See Also

### Getting the Public and Private Databases

- [privateCloudDatabase](cloudkit/ckcontainer/privateclouddatabase.md)
- [sharedCloudDatabase](cloudkit/ckcontainer/sharedclouddatabase.md)
- [database(with:)](cloudkit/ckcontainer/database(with:).md)
