I have an app uses CloudKit
to store data. When I am testing, installing from Xcode, it works well. When I submit to iTunes Connect, and install as beta App it does not go through some CloudKit startup processes. I do not now the exact problem. Can it be that I need CloudKit` Deploy into Production?
It is hard to test. I can not debug the TestFlight version, only the Xcode version, but that works.
A TestFlight app will use the production CloudKit container. So you do have to deploy to production before using your app from iTunes connect.