Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Simen Anthonsen
1,097 PointsHow do I save records to production instead of developement?
Ok, so here is my situation. Yesterday I submitted my app to the App Store. Today, I tested it through TestFlight, and discovered my CKRecords are not being uploaded because they are in the development section and not in the production section. I am now making a dummy app where I plan to retrieve all of my CKRecords in the development section, and save them to the production section. But how do I save records to the production section? This is my code:
func uploadRecordsToProduction() {
let cloudContainer = CKContainer(identifier: "MyContainserString")
let publicDatabase = cloudContainer.publicCloudDatabase
publicDatabase.saveRecord(record, completionHandler: {_,_ in })
}
But the records just gets saved to the development section.
Will I need to submit my dummy app, in order to save the records to product section?