Question: I am building an app that needs to subscribe to record changes in the public database of iCloud. Now, after watching the apple video's and reading their documentation, I decided to get to work. However, I immediately got stuck here:

[![enter image description here](https://i.stack.imgur.com/Nnta4.png)](https://i.stack.imgur.com/Nnta4.png)

All initialization methods on a CKSubScription are deprecated. This can be seen [here](https://developer.apple.com/reference/cloudkit/cksubscription), but meanwhile apple still seems to use the very same methods in their documentation [here](https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/CloudKitQuickStart/SubscribingtoRecordChanges/SubscribingtoRecordChanges.html#//apple_ref/doc/uid/TP40014987-CH8-SW1).

This left me surprised. Looking around on the web and SO, there doesn't seem too be much information or any tutorials available (at least, none with up to date info on initializing subscriptions), probably because this technology is relatively new and these changes are recent. I have very superficial experience with CloudKit, so I'd rather ask for a decent way to do this than to improvise something myself. My question is: 

**How to initialize a CKSubscription?**

Obviously, if the entire idea of subscriptions is outdated I am open to any answer that will result in my app receiving pushes when records of specific types appear in my public database.

Answer: 
Seems like `CKSubscription` is really more or less deprecated.

According to <http://iosdevetips.blogspot.de/2016/06/deprecated-apis-in-ios-10.html> you should use `CKRecordZoneSubscription` and `CKQuerySubscription` now.

---

**Update:**
Like Trevis pointed out, the docs are not really helpful here, but at least Xcode shows a somewhat helpful Warning:
[![enter image description here](https://i.stack.imgur.com/xs7Rf.png)](https://i.stack.imgur.com/xs7Rf.png)
If you are looking for a new class to substitute Apple's own documentation, use `CKQuerySubscription` in place of `CKSubscription`. They have almost identical initializers.