Post

Replies

Boosts

Views

Activity

Reply to Anyway to specify a unique constraint in Cloudkit record?
Hi everyone! Is this a feature yet? Here is my use case... I have an iOS app using CloudKit for the backend. I have a record for custom user called MyUser. Each MyUser record has a field called username. I want to let the users edit their usernames on the app but I also want to make sure there are no duplicate usernames. If a user tries to change their username to a username that is already taken I want them to see an error. If I could mark the username field as must be unique on CloudKit, then when I send the network request to change the username CloudKit will send an error back if it is taken. Without this, I can implement my own check to see if a username is taken by querying the MyUser records by username. But what if two different apps query for the same username at the same time... yes there is only a very small chance of this happening but it is NOT impossible. The queries would return with no users ( aka username is available ) and then both users would send the next network request to change their usernames to the same username. Is there a better way to achieve this? I think marking the username field on the MyUser record as "isUnique" would be very handy.
Apr ’24
Reply to WKWebView evaluateJavascript method crash with async/await when javascript call doesn't have return value
+1 w/ Xcode15.4 ios 18.1
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to CloudKit 503 Error All Users
FB14940068 (CloudKit 503 Service Unavailable for all users)
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftUI Map + Marker + AsyncImage Support
Thank you so much for the reply! that worked.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to MKLocalSearch missing Music Venues from response
Thank you! This is what I was looking for.
Replies
Boosts
Views
Activity
Aug ’24
Reply to NavigationPath and navigationDestination with custom back button fails on iOS 17 BETA
navigationDestination is still very buggy on 17.3. it doesn't register the first change to the NavigationStack(path:) binding...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Anyway to specify a unique constraint in Cloudkit record?
Hi everyone! Is this a feature yet? Here is my use case... I have an iOS app using CloudKit for the backend. I have a record for custom user called MyUser. Each MyUser record has a field called username. I want to let the users edit their usernames on the app but I also want to make sure there are no duplicate usernames. If a user tries to change their username to a username that is already taken I want them to see an error. If I could mark the username field as must be unique on CloudKit, then when I send the network request to change the username CloudKit will send an error back if it is taken. Without this, I can implement my own check to see if a username is taken by querying the MyUser records by username. But what if two different apps query for the same username at the same time... yes there is only a very small chance of this happening but it is NOT impossible. The queries would return with no users ( aka username is available ) and then both users would send the next network request to change their usernames to the same username. Is there a better way to achieve this? I think marking the username field on the MyUser record as "isUnique" would be very handy.
Replies
Boosts
Views
Activity
Apr ’24