Posts

Post not yet marked as solved
1 Replies
731 Views
TL;DR - the data created in the CoreDataCloudKitDemo WWDC sample app can't be fetched in the CloudKit Dashboard. What is missing from the docs/WWDC talk to make this queryable in the Dashboard?---------------------------First time CloudKit integrater here, so I may be having a problem that's obvious to others but not so much to myself. I'm having a tough time trying to figure out the missing pieces of how to integrate Core Data with CloudKit, given in this fantastic talk WWDC19 here. The only thing missing from the talk was a demo on the CloudKit Dashboard - which is an important thing to leave out, because it's completely changed!I've downloaded the CoreDataCloudKitDemo sample code, and have logged into iCloud on the simulator and set up a container in the dashboard with the same bundle id as the sample code app.When I run it, it sets up the schema on CloudKit Dashboard as expected. This is verified when I created a post in the app on the simulator, a record type of CD_Post is in the CloudKit Dashboard. That's fine, check.What it doesn't do though is upload the data. I'm just trying to verify if the data is in CloudKit Dashboard, yet when I do a query on CD_Post I get 0 results. I'm trying on the public database, but I've also tried on the private and shared database with the same results.On that note, I'm also confused about how to actually specify within code whether to use the public database. In the previous CKContainer you could access either the publicCloudDatabase or privateCloudDatabase attributes. But in the new NSPersistentCloudKitContainer, which is completely uninherited and unrelated to the CKContainer, it doesn't seem to have any ability to reference or set whether you're using public or private databases.I've waited until near the end of the Xcode beta release, because I thought that incomplete functionality might be taken care of before release. But I'm now concerned about the lack of documentation in how to actually use Core Data with the CloudKit Dashboard, I don't see how anyone is supposed to create an app using this framework ahead of the iOS 13 release.
Posted
by mikepost.
Last updated
.
Post not yet marked as solved
3 Replies
1.2k Views
Ok, I'm having a tough time trying to figure out the missing pieces of how to integrate Core Data with CloudKit, given in this fantastic talk WWDC19 here. The only thing missing from the talk was a demo on the CloudKit Dashboard - which is an important thing to leave out, because it's completely changed!I've downloaded the CoreDataCloudKitDemo sample code, and have logged into iCloud on the simulator and set up a container in the dashboard with the same bundle id as the sample code app.When I run it, it sets up the schema on CloudKit Dashboard as expected. This is verified when I created a post in the app on the simulator, a record type of CD_Post is in the CloudKit Dashboard. That's fine, check.What it doesn't do though is upload the data. I'm just trying to verify if the data is in CloudKit Dashboard, yet when I do a query on CD_Post I get 0 results. I'm trying on the public database, but I've also tried on the private and shared database with the same results.On that note, I'm also confused about how to actually specify within code whether to use the public database. In the previous CKContainer you could access either the publicCloudDatabase or privateCloudDatabase attributes. But in the new NSPersistentCloudKitContainer, which is completely uninherited and unrelated to the CKContainer, it doesn't seem to have any ability to reference or set whether you're using public or private databases. I've waited until near the end of the Xcode beta release, because I thought that incomplete functionality might be taken care of before release. But I'm now concerned about the lack of documentation in how to actually use Core Data with the CloudKit Dashboard, I don't see how anyone is supposed to create an app using this framework ahead of the iOS 13 release.
Posted
by mikepost.
Last updated
.
Post not yet marked as solved
0 Replies
758 Views
Hi,I have multiple Text views stacked vertically in a VStack, then something to the right of the VStack, let's say an image.But when I have more than 1 Text view all of the Text views truncate! If I only have 1 Text view, it dynamically sizes the width as expected to the right image, and wraps the text to multiple lines if needed.Using the SwiftUI tutorial files, a basic visual of what's happening would be this:When really what I'm aiming for is for the Text to be wrapped onto multiple lines and not truncated like this:How do I maintain 2 or more Text views in the VStack without truncating each?The code is as follows:var body: some View { HStack(alignment: .center) { VStack(alignment: .leading, spacing: 5) { Text(landmark.name) .background(Color.purple) Text(landmark.name) .background(Color.green) } Spacer() landmark.image .resizable() .frame(width: 50, height: 50) } }
Posted
by mikepost.
Last updated
.
Post marked as solved
4 Replies
6.4k Views
As of beta 5, the following doesn't work:var body: some View { NavigationView { Text("Hello") .navigationBarTitle(Text("My App")) } .background(Rectangle() .foregroundColor(.blue)) }Neither does just using the background modifier:var body: some View { NavigationView { Text("Hello") .navigationBarTitle(Text("My App")) } .background(Color.blue) }Is this a bug, or is there an undocumented way to change the background color from the default white?Just to be comprehensive, i've also tried setting the univeral appearance on UIView and UILabel:UIView.appearance().backgroundColor = UIColor.green UILabel.appearance().backgroundColor = UIColor.redThis does change the background color, but... the Text protocol doesn't seem to respond to UILabel, so the background of any Text contained within the NavigationView remains green (the UIView.appearance color).If there's no possible way to change the NavigationView background color in the beta, that's ok. I just want to know if I should stop searching for answers or not. Or if there is an answer I'd like to know it 🙂
Posted
by mikepost.
Last updated
.