How to set up a minimal CKSubscription?

前端 未结 2 422
别那么骄傲
别那么骄傲 2021-02-06 00:15

I want to set up a simple CKSubscription that notifies me a recordType was created, how?

2条回答
  •  [愿得一人]
    2021-02-06 00:42

    Did you register for notifications? You should have something like this in your application didFinishLaunchingWithOptions:

    application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: .Alert | .Badge | .Sound, categories: nil))
    application.registerForRemoteNotifications()
    

    I created a working demo that is available at https://github.com/evermeer/EVCloudKitDao

提交回复
热议问题