Post

Replies

Boosts

Views

Activity

Comment on How to undisplay `Private Access` in `Contacts Access` when i use `CNContactPickerViewController`?
You might instead consider the SwiftUI Contact Access Button (and if not using SwiftUI, use UIHostingViewController of the appropriate SwiftUI ContactAccessButtonView and .contactAccessPicker). See Meet the Contact Access Button and https://developer.apple.com/documentation/Contacts/accessing-a-person-s-contact-data-using-contacts-and-contactsui and https://developer.apple.com/forums/thread/756972.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
Comment on How to undisplay `Private Access` in `Contacts Access` when i use `CNContactPickerViewController`?
@Alex_Lyu - FWIW, when the picker fires up (in iOS 18), it also says, “Private Access to Contacts – Your contacts are shown here, but "{app name}" can only access the contacts you select.” If your app saves details for contacts that they picked, you could add a UI for them to delete what contact info they’ve saved in your app. But the Contacts framework does not give your app persistent access to the contacts they selected (unless you went down the CNContactStore road).
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
Comment on How to undisplay `Private Access` in `Contacts Access` when i use `CNContactPickerViewController`?
If you look at the text below “Private Access”, it clearly tells your customer what this means: “This app can show your contacts, but can only access the contacts you select.” So, if a user tapped on a contact, the details of that contact have been shared with your app (and what you do with it is a matter of your own internal business practices). But if a user did not select a contact in the UI, you simply have no access. It's all right there in the line below “Private Access”.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
Comment on Struggling with async/await: Fetching an image off the main thread
@DTS Engineer – I get what you intended re your four options (ensure that the function is not isolated to the main actor) but for the sake of future readers, that alone is insufficient. A nonisolated synchronous function will just run on the current thread. I just wanted to draw readers attention to the key observation that you made this both nonisolated and async, to get it off the current actor.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’24
Comment on Swift 6 Concurrency Errors with MKLocalSearchCompleterDelegate results
Note: A frequent flow consists of the use of MKLocalSearchCompleter for list of completions, and then when one is selectsd, then create a MKLocalSearch.Request from that. In that case, the above pattern introduces a problem that you no longer have a MKLocalSearchCompletion to pass to MKLocalSearch.Request. There are workarounds, so if you want to see example, let me know. Hopefully they will soon fix MKLocalSearchCompleter to support strict concurrency and avoid all this silliness.
Dec ’24
Comment on Cannot run Animation Hitches Instrument
I think it’s broader than just the “hitches” instrument. I think “deferred” mode is broken for all instruments on physical devices. E.g., “Time Profiler” template manifests the same problem if you select “deferred” mode when profiling on iOS 18.1 physical device (but not simulator). I confess that I’ve only tested on iOS 18.1, but I don’t know if it applies to other iOS versions or not.
Dec ’24
Comment on Async/Await and updating state
I suspect he didn’t explicitly mention AsyncStream (or any AsyncSequence) because that falls under the banner of “stick with Swift concurrency”. I don’t think many would call it an “observation”, as it is a much broader pattern. But you are correct that there are parallels and it can be used to achieve observation-like behaviors.
Dec ’24
Comment on Is there an equivalent of DispatchQueue.concurrentPerform() with the new async/await?
I agree re concurrency not being the same thing as parallelism. But you appear to suggest that one cannot achieve parallelism with a task group. But we do (and we avoid the thread explosion issues of queue.async while simultaneously enjoying structured concurrency benefits). All of my recent computationally intensive and massively parallel tests demonstrate that task group performance is indistinguishable from concurrentPerform. Help me understand why not task group? I see no downside.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’22