Post

Replies

Boosts

Views

Activity

Reply to When are the new NL features available?
I just wanted to leave a reply as I just installed Public Beta 1 and Xcode Beta 12 but still, the sentenceEmbedding API is not available in my playground test. Also, it seems we are the only people who asked questions on the WWDC hashtag but no one ever answered? Not a good start for the "new" dev forums, if you ask me. :(
Aug ’20
Reply to Does iOS kill my app for high CPU usage?
I just wanted to say thanks for sharing not only your problem but also approach to solution. I am currently experiencing something similar although on a smaller scale. I am running in the background in the "heavier" BGProcessingTaskRequest. And get crashed like so: Event: cpu usage Action taken: Process killed CPU: 48 seconds cpu time over 55 seconds (87% cpu average), exceeding limit of 80% cpu over 60 seconds My current suspicion is that I am using DispatchQueue.global(qos: .background) which might look for such a limit but I am not sure about it. Also the docs specifically ask to use this queue in the background. Maybe it is something different but it would be odd to claim you can train a machine learning model in the background if you are not allowed to use more than 80% cpu over 60 seconds.
Sep ’21
Reply to Jaggy, Laggy, low-fps scrolling on iPhone 13 Pro (Pro Motion Display) for .offset
If anyone comes here for a solution. I still believe this is a bug in DragGesture but there is workaround possible though CADisplayLink. (See here: https://developer.apple.com/documentation/quartzcore/optimizing_promotion_refresh_rates_for_iphone_13_pro_and_ipad_pro) Unfortunately, you will have to create a helper object to setup a display link, because you can't have @objc functions in structs. I created: @available(iOS 15.0, *) class RefreshRateHelper {     static let shared = RefreshRateHelper()     private var displayLink:CADisplayLink? = nil init() {         displayLink = CADisplayLink(target: self, selector: #selector(ignore))         displayLink?.add(to: .current, forMode: .default)     }     @objc     func ignore(link: CADisplayLink) {     }     func preferredFrameRateRange(_ range:CAFrameRateRange){         displayLink?.preferredFrameRateRange = range     }         } This very hacky. It basically is a globally accessible display link that you give a preferred framerate. I ended up setting a high framerate in .updating and resetting it to .default in onEnded. I hope this helps someone.
Oct ’21