Post

Replies

Boosts

Views

Activity

how to execute photoLibraryDidChange(_:) when the app is in background?
Goal is to get/save the captured photo (From default camera) immediately from my app when the app is in background. When I capture a photo with default camera, photoLibraryDidChange(_:) function do not execute that time. But when I reopen my app, that time this function executes and give the images, which were captured in that particular time. how to execute photoLibraryDidChange(_:) when app is in background?
1
0
475
Oct ’23
How to generate video with animation using swift
Wrote a transition code for some images. It can show image one by one. But I want to create a video with this kind of animations (Zoom in, Zoom out etc). How can I achieve this. UIView.transition(with: self.imageView, duration: 2.0, options: .transitionCrossDissolve, animations: { self.imageView.image = UIImage(imageLiteralResourceName: "image2") }, completion: nil)
0
0
717
Aug ’23
Unable to get app wise usage duration using Screen time API
I am working with DeviceActivity to get the screen time. I always have screen time zero second (0s). But it should have some value. I am selecting apps using familyActivityPicker and passing the tokens in the filter. @State private var context: DeviceActivityReport.Context = .init(rawValue: "Total Activity") filter = DeviceActivityFilter( segment: .daily( during: Calendar.current.dateInterval( of: .weekOfYear, for: .now )! ), users: .all, devices: .init([.iPhone, .iPad]), applications: applications, categories: categories, webDomains: webDomains ) DeviceActivityReport(context, filter: filter) I saw various posts regarding this, but nothing working in my side. I am unable to identify the issue of getting zero second all the time.
1
0
579
Aug ’23