The problem is that the button is dead it is not accepting the tap.
I put in debug break in isSelected = true statement. When I tap the button it never hits the breakpoint, it is as if the navigationlink button is inactive. How to make it active.
NavigationLink(destination: DetailsView(), label: {
Button(action: {
isSelected = true
}){
Image(systemName: "play.circle")
}
.scaledToFit()
.frame(width: 50, height: 50)
.background(Color.blue)
.foregroundColor(.white)
.clipShape(Circle())
})
Post
Replies
Boosts
Views
Activity
Changed the pin from state to Binding, did not work either
reboot the phone worked, dont know why
A core data entity in the same configuration got synchronized with cloudKit after a delay of one day. Is there a wait time for synchronization?
The above code works if the coredata entity is in private configuration, synchronization to cloud kit and data transfer works correctly. The only problem is that it does not synchronize and transfer data from public coredata configured entities to cloudkit. At a loss to understand why
I inserted debug statement and got bunch of output. I could not figure out anything. So I deleted the app from my phone, and that should have deleted the local core data except icloud data. Then I connected the phone and ran again, the deleted records were retrieved from cloud kit. So that means it exists on cloud kit. However when I go to cloudKit and query for that CkRecord in public database it does not return any records. However it is retrieved from cludkit The debug console shows:
Importing updated records:
"<CKRecord: 0x1371117d0; recordType=CD_Contact, recordID=C8665C72-1489-4A5B-A862-D8C74219B5AC:(com.apple.coredata.cloudkit.zone:defaultOwner), recordChangeTag=ly, values={\n "CD_email" = E;\n "CD_entityName" = Contact;\n "CD_firstName" = V;\n "CD_imageName_ckAsset" = "<CKAsset: 0x13710b2a0; referenceSignature={length = 21, bytes = 0x016f67dfd0e6f5e95265715be55e67638763588cb7}, uploadRank=0, path=/private~/Library/Caches/CloudKit/ddfda053c3b06e4b4fc14067715eb6799399b480/Assets/059AD8FD-1A39-4AA9-83F5-2114E670D8F6.011ae0acd6179011e5f5b153e01a6b8b6b3146912b, size=3241087, UUID=059AD8FD-1A39-4AA9-83F5-2114E670D8F6, signature={length = 21, bytes = 0x011ae0acd6179011e5f5b153e01a6b8b6b3146912b}, wrappedAssetKey=<24 bytes>>";\n "CD_lastName" = R;\n "CD_phone" = 2;\n "CD_screenName" = Be;\n "CD_uniqueId" = "102B2E06-79B5-45E7-A01C-2169412D08FB-4156-0000015E1DE289BE";\n "CD_userRating" = "*****";\n "CD_userType" = Household;\n}>"
I was puzzled as to why cloudKit does not show any records. I have indexed recordName as Queryable, modifiedTimeStamp as queryable and sortable. I have only one defaultZone.
By chance I decided to check private database and queried records from private database and lo and behold they were all there. So why are my records going to private database instead of public database. I have posted all my code above and nowhere you can see I have configured private database store. In fact I am using default code provided by Apple and some code from net and I assumed it would go to public database. Can you clarify why it is going to private database and how to point it to public database. I do want some records to go to private database though. So I Need the option to synchronize some data to public and some to private database. How to do this?
Yes happens in Simulator. I cleaned build folder, deleted the derived data, and restarted Xcode. Same issue cannot edit Textfield. Double clicking on Textfield, the Paste menu comes up and it pastes the previous text from copied buffer. Did going back to 14.2 from 14.3 mess it up?
I accepted the answer but I would really like to know how to position with frame and pos
DetailsView gets called, but I can't step into it in debug mode .
Look at the code below, the first time, it displays Contact Section and contained data at some position. Next time when I update the view with location Section and contained data, it pushes the Contact Section and so the whole thing keeps moving up and up as I keep adding more information dynamically to the screen. I want to pin each section as I keep adding. So How can I use frame and position to make it work like a layout with fixed positioning of Section and contained data?
var body: some View {
NavigationStack {
VStack (alignment: .leading) {
Section(header: Text("**Contact**")){ // section text bold with ** before and after text
ContactLabelView(myContact: $contact)
//.ignoresSafeArea(edges: .top)
Text(contact?.firstName ?? "")
.frame(height: 22)
.background(.gray.opacity(0.2))
.frame(height:22)
}
if $contact.wrappedValue != nil {
Section(header: Text("**Location**")){ // section text bold with ** before and after text
LocationLabelView(location: $location, contact: $contact)
if $location.wrappedValue != nil {
let details = self.getLocationString(location: location!)
Text(details)
.frame(height: 22)
.background(.gray.opacity(0.2))
.frame(height:22)
}
}
}
}
Spacer()
}
}
Of course I can find out who shared the record, when I get a sharing message/email from user. But is there a programmatic way to find out who the user is from the shared CKRecord.
When I save a record to Coe data it gives the following error:
CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate remoteStoreDidChange:](2678): <NSCloudKitMirroringDelegate: 0x28125aa40>: Observed remote store notification: <NSPersistentStoreCoordinator: 0x28024f870> - 62A30810-81D5-4B3E-8268-D67AC946275B - <NSPersistentHistoryToken - {
"62A30810-81D5-4B3E-8268-D67AC946275B" = 1;
}> - file:///var/mobile/Containers/Data/Application/F31692C2-BFAC-449F-A2AD-5FEEF2DCC979/Library/Application%20Support/public.sqlite
CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate managedObjectContextSaved:](2635): <NSCloudKitMirroringDelegate: 0x28125aa40>: Observed context save: <NSPersistentStoreCoordinator: 0x28024f870> - <NSManagedObjectContext: 0x281260000>
CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate remoteStoreDidChange:]_block_invoke(2731): <NSCloudKitMirroringDelegate: 0x28125aa40> - Ignoring remote change notification because it's for a different store: DCCFA919-33E0-4936-B3A7-2E5CC0375CDC / 62A30810-81D5-4B3E-8268-D67AC946275B
By the way I accidentally deleted the CD_FAKE_Contact_... record that existed in CloudKit. Is it because of that or is it because the public.sqlite path is different in the current phone than the previous phone I earlier used
The GROUPID field in CKRecord is a good idea. But let us say I have Location CKRecord in my public database create with group ID for my group ID "123456". My question - How do I distribute "123456" programmatically to others in my group, so that when they create their Location CKrecord they can use my group ID "123456". Unless they create the Location CKRecord with my group ID my subscription wont get their records correct? The reason I ask is because - some other user may want to create his/her own group using my app with some other GROUP ID let us say "654321". How does my app take "654321" and share it with his/her contacts which are completely different from my contacts with whom I want to share my GROUP ID "123456", all programatically shared and used in the app while creating Location CKRecord?
When the UICloudSharingController crashes it gives error: 2020-08-31 22:33:46.303978-0500 rpxg[3789:1613179] [CK] Got a connection error for operation 49B9977581013179: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.cloudd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.cloudd}
thank you