Posts

Post not yet marked as solved
0 Replies
301 Views
My experience with Core Data and CloudKit has been very positive. I have an existing app which uses Core Data + iCloud, but it's time to redo it.I created an app for simulation, dragged my app's core data model into it and examined the result when I enabled the schema. I had to make all of my atrirbutes optional. I allso cleaned it up and slimmed it down up deleting some entities that I wasn't using. I got the message that the result was successful. Then I saved some core data onto the simulated app and opened the simulator for another device. I got the data back from the cloud. So, I'm syncing.It was pretty simple.The harder part will be to go thru the history and find changes related to my view.
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
6 Replies
677 Views
I've created a little demo of this. I have two sections, each of which have two rows. Each row has a navigation link to different text. When I click on a row in Section 1, both rows within that section fire and I get two navigation transitions. It's the same with rows in Section 2. The code is below. Each row should fire individually, not as a group.struct NavLink : View { var body: some View { NavigationView { List { Section (header: Text("Section Header 1").font(.headline)) { VStack (alignment: .leading) { HStack { NavigationLink(destination: Text("This will go to view 1.")) { Text("Text1: ") .bold() Text("More text 1") } } Divider() HStack { NavigationLink(destination: Text("This will This will go to view 2.")) { Text("Text2: ") .bold() Text("More text 2") } } } } Section (header: Text("Section Header 2").font(.headline)) { VStack (alignment: .leading) { HStack { NavigationLink(destination: Text("This will go to view 3.")) { Text("Text3: ") .bold() Text("More text 3") } } Divider() HStack { NavigationLink(destination: Text("This will go to view 4.")) { Text("Text4: ") .bold() Text("More text 4") } } } } } .navigationBarTitle(Text("NavLink Demo"), displayMode: .automatic) .listStyle(.grouped) } } }
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
1 Replies
529 Views
I am unable to use more than one .presentation in a SwiftUI view. Below is a simple example.import SwiftUI struct ContentView : View { @State private var showingAlert = false @State private var showSavedAlert = false var body: some View { VStack { Text("Hello World") Button(action: { self.showingAlert = true }) { Text("Save") } Button(action: { self.showSavedAlert = true }) { Text("Save2") } } .presentation($showingAlert) { Alert(title: Text("Save File?"), message: Text("Do you want to save?"), primaryButton: .default(Text("Save")) { }, secondaryButton: .cancel()) } .presentation($showSavedAlert) { Alert(title: Text("Another Save File?"), message: Text("Do you want to save?"), primaryButton: .default(Text("Save")) { }, secondaryButton: .cancel()) } } } #if DEBUG struct ContentView_Previews : PreviewProvider { static var previews: some View { ContentView() } } #endifDoes anybody have a workaround?
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
0 Replies
194 Views
The sections of a list look very plain and gray. I've tried a ZStack and .background, but none of them work for me.Has anybody found out how to add color to the sections? Something besides gray, that is.
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
1 Replies
821 Views
.onDisappear is never called.Also, when I put an .onAppear in a main view and navigate back to that view, the .onAppear is not called.
Posted
by SpaceMan.
Last updated
.
Post marked as solved
1 Replies
507 Views
I've implimented a picker in SwiftUI, but the text in the wheel is cut off and it's only showing 7 characters followed by ...Can anybody explain why and how I can display the entire text?
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
0 Replies
787 Views
Is Core Data with iCloud beaking with iOS 13? When I simulate my app with iOS 9.3 deployment target, I get the. following.-[PFUbiquitySwitchboardEntryMetadata setUseLocalStorage:](897): CoreData: Ubiquity: nobody~simblahblahblah:iCloudStoreUsing local storage: 0 for new NSFileManager current token <blah1 blah2 blah3 blah4 blah5>This is the expected behavior. However, when I simulate my app with iOS 13.0 deplloyment target, I get the following.[Assert] Calling deprecated SPI on UICanvas. This method and class will dissapear prior to GMAnd btw, there is a spelling error on disappear.
Posted
by SpaceMan.
Last updated
.
Post not yet marked as solved
1 Replies
672 Views
I am using Xcode to manage the profile of a simple test app. I created the project and enabled CloudKit, but wanted to use another container that had the data record structure that I wanted. Xcode's default when you enable CloudKit is to use the default container. I then clicked on 'specify custom containers' and added the container I wanted and deselected the default container.When I ran the app, I got an error message about how the default container doesn't have the record structure. I looked at the profile and the default container is still in the profile along with the specific container that I really wanted. I don't want the default container in the profile. That refresh circle below the container list didn't do the trick. The only way I could get this to work, was to go to the portal and edit the Xcode managed App ID, create a development profile which used that app id and use that instead of the Xcode managed profile.
Posted
by SpaceMan.
Last updated
.
Post marked as solved
3 Replies
1.4k Views
In a number of my projects, I’m finding that instead of clean showing up initially, clean build folder is showing up. Anybody else see this? Normally, the option key would display clean build folder and clean would be displayed without the option key.
Posted
by SpaceMan.
Last updated
.
Post marked as solved
2 Replies
2.6k Views
Anybody else having data issues after the iOS 11 GM update? I searched outside and got no service, then I nocticed that I had 4G. I'm on the AT&T network.
Posted
by SpaceMan.
Last updated
.