Post

Replies

Boosts

Views

Activity

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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
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 BGProcessingTaskRequest gets killed due to high cpu usage
If you are coming here for a solution. Radar feedback was, that only with requiresExternalPower property, the cpu usage is "unlimited". I have not tried yet but wanted to share.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to onOpenURL not called on iOS 15
This was related to a "hack" to be able to change the status bar color. See here https://stackoverflow.com/questions/69280813/onopenurl-not-called-on-ios-15-simulator-swiftui .
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Jaggy, Laggy, low-fps scrolling on iPhone 13 Pro (Pro Motion Display) for .offset
I posted this as FB9657760
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to BGProcessingTaskRequest gets killed due to high cpu usage
I am not sure if that other thread helps me but thanks for sharing. I filed this as FB9650676.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’21
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.
Replies
Boosts
Views
Activity
Sep ’21
Reply to CoreML Inference Error: "Could not create Espresso context"
Did you ever find a solution? I just got the same by feeding an image to VNImageRequestHandler to or rather an VNGenerateAttentionBasedSaliencyImageRequest. I am on Simulator 14.5.
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jun ’21