Why does CloudKit server deny request by app to ask user if he wants to share personally identifiable information with app?

I have the following code in an Xcode project for an iOS app that is supposed to request from the user permission to allow CloudKit to give my app the user’s identifiable information like name and the email address of the iCloud account.

@IBAction func actionGo(_ sender: UIBarButtonItem) {
    
        CKContainer.default().requestApplicationPermission(.userDiscoverability) {
        
            (status, error) in
        
            print(error!)
        
        }

I get the following error as printed to the debug screen by the print statement in my code:

<CKError 0x15e568b0: "Service Unavailable" (6/2022); "Request failed with http status code 503"; Retry after 30.0 seconds>

I have been getting this error over the past week. It’s not likely that it’s a service outage at Apple’s CloudKit servers. I’ve enabled CloudKit in my Xcode project along with a default Container. None of the other questions on Stackoverflow on this topic answers my question.

Anyone have any ideas what the problem is? Is it only a matter of a setting I didn’t set in CloudKit or Xcode?

Well, have you tried to open the app from somewhere else? Sometime it might give an error in the same device try opening it on someone else to and if it’s not opening then its definitely crash from their side.

Regards
Expert Logo Design - Logo Nexus

It has been some time ago that I found a solution to this problem, but I am sure I remember correctly that the solution was for me to log on to CloudKit Dashboard into the project for the first time. That did something to allow me access like I was trying to do.

Thank you for your input.