Post

Replies

Boosts

Views

Activity

Download progress when using URLSession.shared.dataTaskPublisher
I'm downloading files using a dataTaskPublisher - and the actual download is going great. What I'm wondering is if there is any way to show the "percent downloaded"? Here's my code: cancellable = URLSession.shared.dataTaskPublisher(for: url)     .map { UIImage(data: $0.data) }     .replaceError(with: nil)     .handleEvents(receiveSubscription: { [weak self] _ in self?.onStart() },                   receiveOutput: { [weak self] in self?.cache($0, id) },                   receiveCompletion: { [weak self] _ in self?.onFinish() },                   receiveCancel: { [weak self] in self?.onFinish() })     .subscribe(on: Self.imageProcessingQueue)     .receive(on: DispatchQueue.main)     .sink { [weak self] in             self?.image = $0     }
1
0
831
Oct ’20
Add a UIImage to a Plane in RealityKit
I'm trying to dynamically add a UIImage that is in memory (that is dynamically created at runtime and changed over time) to a RealityKit scene. I see with TextureResource that I can easily do this by creating a material from an image file in my bundle, but I don't see any way to do this with just a UIImage. Is there another way to go about this that I'm just missing? Any help would be appreciated!
4
0
2.7k
Aug ’20
My app is continually rejected because in app purchases aren't working
My in-app purchases work in TestFlight without problem, and my testers report the same. What seems to be the problem is that when Apple is testing, when the app requests the SKProducts from Apple, they are either not being returned at all, or an empty set of SKProducts is being returned. At the moment, all of my in-app purchases are listed as "waiting for review". Do I need to wait for my in-app purchases to be returned before I submit my app again - as in, is it possible that when Apple tests, my app is failing because only approved in-app purchases are being returned (in this case, none, because this is a new app)?
13
0
7.6k
Sep ’19