No access to iCloud in Big Sur

I have an app that is working correctly on macOS Catalina but in Big Sur it doesn't have access to iCloud.

CKContainer containerWithIdentifier:accountStatusWithCompletionHandler: returns CKAccountStatusNoAccount and [[NSFileManager defaultManager] ubiquityIdentityToken] returns nil

In System Preferences it is not even listed in the apps that use iCloud.

Signing & Capabilities is properly configured and is working on macOS Catalina. On the computer with Big Sur I have verified that I have iCloud on and I have exchanged files through iCloud Drive with my iPhone.

The only peculiarity of the app is that it is a Mac Catalyst app.

Something similar is happening to someone? Anyone know how I could solve it?

Thanks!

Accepted Reply

The problem has already been resolved.

Replies

In Signing & Capabilities I use a different package identifier than iOS. I have done a test exporting the app with the same identifier as in iOS and iCloud has worked.

But I need my app to keep the bundle identifier different from iOS in order to continue supporting my users.
The problem has already been resolved.