GithubHelp home page GithubHelp logo

sample-cloudkit-privatedb-sync's Issues

Add basic error handling

It might help those trying for the sample for the first time to discover errors in their CloudKit container configuration if the error "Couldn't get container configuration from the server for container containerID" was output to the console. I was able to see by adding the code below but it originates in line 65 of ViewModel.swift let changes = try await database.recordZoneChanges

            .onAppear {
                Task {
                    do {
                        try await vm.initialize() // replaces try? await vm.initialize()
                        try await vm.fetchLatestChanges()
                    }
                    catch {
                        print(error.localizedDescription)
                    }
                }
            }

I had the same problem as #6 and had to do some debugging to fix it, it was because I changed the bundle ID. Perhaps if the usual sample code disambiguator routine for an automatic unique bundle ID then it might prevent requiring to edit the bundle ID at all?

Update from Task { } to .task { }

SwiftUI offers .task and .task(id:) for the correct lifetime of async actions, it would be great if the sample could be updated to use it.

The app compiles and runs but it does not seem to save any contacts

I'm a bit stuck here. I've done the following:

  1. I downloaded the project.
  2. I verified that I was signed-in to my active developer account in Xcode.
  3. Xcode version is: 14.3.1 (14E300c).
  4. I configured the signing team, app bundle of my own and iCloud container (the container id is the same as the app id but with the iCloud prefix).
  5. I configured the iCloud container id in the Config.swift file.
  6. I ran the project on two devices, both showed "Did register for remote notifications" in the console.
  7. Both devices are running the latest public version of iOS and iPadOS (iOS 16.5.1 (20F75) and iPadOS 16.5.1 (20F75)) and both are signed-in with the same Apple ID Account.

When I run the app on the devices, it initially shows and empty contacts screen, when I try to add a new contact it just dismisses the screen and no contact is added and nothing happens on the other device.

Also, no message is shown on the console when trying to add a contact in the other device or the current one.

I'm attaching a screen recording of this running on an iPad.

RPReplay_Final1689618220.mp4

Any ideas of what I might be missing?

Thanks in advance.

This app does not work

Error message: "Error saving new contact: <CKError 0x600003c877b0: "Bad Container" (5/1014); "Couldn't get container configuration from the server for container

Should local cache be saved first then save server change token?

/// Save our new change token representing this point in time.
saveChangeToken(changes.changeToken)
/// Write updated local cache to disk.
await saveLocalCache()

Hi there, I noticed this sample app saves the server change token before local cache were being saved.
Doesn't this mean if the app exits before local cache saved to the UserDefaults, the app will only fetch changes from the newest token the next time it starts and ignoring all previous changes?

Notification comes early than changes are applied (Contact creation)

Hi, thank you for the repo I got a lot of information
I would open just discussion bot not issue about the topic but don't see the option for discussion
I test the example on iPad and iPhone

When I add Contact the notification on other devices comes early then Contact was created in the cloud data base, so fetchLatestChanges does not fetch new dataset with created record
When I delete there's no such effect everything is fine

The only solution currently to add delay(Task.sleep) before
try await PrivateSyncApp.vm.fetchLatestChanges()
then everything is fine

Do you have the same effect ?

Enhancing Smartphone OS with Pixel Art Filter for Privacy & AI Countermeasures

Dear Android and iOS Development Teams,

I hope this message finds you well. As a passionate user of your respective operating systems, I have a suggestion that I believe could significantly enhance both the user experience and privacy of smartphone users. I propose the inclusion of a built-in pixel art filter, similar to the functionality provided by tools like pixa.pics, to counteract the ease with which artificial intelligence can generate deepfakes.

Pixel art has unique emergent properties that are not present in the typical information body used to feed AI algorithms. By incorporating a pixel art filter that scales with the camera's resolution, the images captured by smartphones would not only be visually appealing, but also provide an additional layer of protection against potential misuse by AI systems. As many smartphone cameras currently generate images that can be easily exploited by AI, offering an alternative that is both aesthetically pleasing and more secure would be a valuable addition to your operating systems.

The incorporation of a pixel art filter would reduce the risk of deepfake creation, as AI systems would struggle to convincingly replicate the intricacies of pixel art. This would, in turn, provide users with greater privacy and make it more challenging for bad actors to misuse their photos or videos. Furthermore, this feature could become a unique selling point for Android and iOS devices, setting them apart from competitors and reinforcing your commitment to user privacy and safety.

I understand that integrating such a feature requires time and resources, but I truly believe the benefits it would bring to users far outweigh the costs. I would be delighted to discuss this further and provide any additional information or support you may require. Thank you for considering my suggestion, and I look forward to hearing your thoughts on this matter.

Sincerely,

A. Matias

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.