Battery Life

RSS for tag

Measure how your application consumes energy.

Posts under Battery Life tag

145 Posts

Post

Replies

Boosts

Views

Activity

Find My network option for AirPods Pro not visible on iOS 15.4. Is it a bug or is it intended??
As title. I just upgraded my iPhone 12 Pro Max to iOS 15.4 Developer Beta 1 from iOS 15.3. Previously, the "Find My network" option was visible in the bluetooth setting for my AirPods Pro. However, after upgrading, this option is missing. Is it a bug or is that something Apple intends to do in the future. I do NOT want to enable this feature because it drains the battery on my AirPods Pro.
0
0
821
Jan ’22
Get battery health
I have the task to add the battery health in app. I searched for a couple of hours and did not find a specific answer whether this is possible in iOS 14 - 15. I found objective-c methods to get this information however they are marked as depricated. Thanks for any help.
1
0
1.3k
Dec ’21
Finding time till battery will fully charged
At the moment, I determine the start time of charging, the percentage of the start of charging and, based on these data, I try to calculate the time until the end of charging. However, the problem is that the values ​​that come from UIDevice.current.batteryLevel don't quite match. Since their accuracy is .00 and this way I can only get data from 1% change. Question Is there any other way to determine the time until the end of charging, or a way to increase the accuracy of reading the charge level? Thanks in advance for your help.
1
0
4.0k
Dec ’21
100% CPU, Energy Efficiency NSPersistentCloudKitContainer / Best Practices?
Hi, I recently added iCloud sync capability to my app via NSPersistentCloudKitContainer. It does push data to the cloud, in other words seems to be working fine. However, I noticed a strong increase in battery drain and when I debug (release and debug build configs) I can see that a NSManagedObjectContext thread that is definitely not mine has 100% CPU load basically all the time. (I waited a few minutes, yes minutes, for it to finish while not using the app at all and it does not stop.) Component utilization shows that most the energy impact is CPU and "overhead" is very low (goes to 0 quickly). There is no network activity visible, so this seems to be some kind of background processing. Also, memory is very, very low (~ 35 MB). I am wondering if I am doing something wrong here or if there is a better practice. Some info about how my app works: It downloads things from the web and generates a lot of entities while doing so. It frequently saves changes (incremental changes in entities, there are lots of save() calls during a refresh). I have not had PersistantHistory enabled before changing my processes to work with iCloud (existing sqlite store). Not sure if anything else is relevant. Any help is appreciated. A bit of log: CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedExportWithLabel:activity:completionHandler:](2958): <NSCloudKitMirroringDelegate: 0x281d34680> - Beginning automated export - ExportActivity: <CKSchedulerActivity: 0x2805bf2f0; containerID=<CKContainerID: 0x282950510; containerIdentifier=iCloud.app.***, containerEnvironment="Sandbox">, identifier=com.apple.coredata.cloudkit.activity.export.368A54A8-5EA2-4177-B6DD-5404550042AD, priority=2, xpcActivityCriteriaOverrides={ Priority=Utility }> CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate executeMirroringRequest:error:](884): <NSCloudKitMirroringDelegate: 0x281d34680>: Asked to execute request: <NSCloudKitMirroringExportRequest: 0x28337ed40> 3052F013-BA85-4BB8-8935-74F829AACA4B CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedImportWithLabel:activity:completionHandler:](2922): <NSCloudKitMirroringDelegate: 0x281d34680> - Beginning automated import - ImportActivity - in response to activity: <CKSchedulerActivity: 0x28057a3f0; containerID=<CKContainerID: 0x282900300; containerIdentifier=iCloud.app.***, containerEnvironment="Sandbox">, identifier=com.apple.coredata.cloudkit.activity.import.368A54A8-5EA2-4177-B6DD-5404550042AD, priority=2, xpcActivityCriteriaOverrides={ Priority=Utility }> CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate executeMirroringRequest:error:](884): <NSCloudKitMirroringDelegate: 0x281d34680>: Asked to execute request: <NSCloudKitMirroringImportRequest: 0x2833664c0> 98E2628F-6AE5-43C0-BA9E-2B72707B31DC Profile of what that thread is doing (inverted):
0
1
1k
Nov ’21
Battery drains unreasonably fast on M1 Macbook Air
Just wondering anyone else running macOS Monterey developer beta 2 or 3 is noticing excessive battery drain? I've filed feedback, FB9400649, regarding this. Tentatively believe this is due to Spotlight running away with the CPU: even while the lid is closed. Note that this M1 MacBook Air is not brand new, and Spotlight months ago built the initial index of the drive. Force-quitting Spotlight in Activity Monitor temporarily resets CPU usage, but after a couple of hours, it is back up to 130 to 180% of the CPU.
1
0
1.3k
Nov ’21
Find My network option for AirPods Pro not visible on iOS 15.4. Is it a bug or is it intended??
As title. I just upgraded my iPhone 12 Pro Max to iOS 15.4 Developer Beta 1 from iOS 15.3. Previously, the "Find My network" option was visible in the bluetooth setting for my AirPods Pro. However, after upgrading, this option is missing. Is it a bug or is that something Apple intends to do in the future. I do NOT want to enable this feature because it drains the battery on my AirPods Pro.
Replies
0
Boosts
0
Views
821
Activity
Jan ’22
Get battery health
I have the task to add the battery health in app. I searched for a couple of hours and did not find a specific answer whether this is possible in iOS 14 - 15. I found objective-c methods to get this information however they are marked as depricated. Thanks for any help.
Replies
1
Boosts
0
Views
1.3k
Activity
Dec ’21
Finding time till battery will fully charged
At the moment, I determine the start time of charging, the percentage of the start of charging and, based on these data, I try to calculate the time until the end of charging. However, the problem is that the values ​​that come from UIDevice.current.batteryLevel don't quite match. Since their accuracy is .00 and this way I can only get data from 1% change. Question Is there any other way to determine the time until the end of charging, or a way to increase the accuracy of reading the charge level? Thanks in advance for your help.
Replies
1
Boosts
0
Views
4.0k
Activity
Dec ’21
100% CPU, Energy Efficiency NSPersistentCloudKitContainer / Best Practices?
Hi, I recently added iCloud sync capability to my app via NSPersistentCloudKitContainer. It does push data to the cloud, in other words seems to be working fine. However, I noticed a strong increase in battery drain and when I debug (release and debug build configs) I can see that a NSManagedObjectContext thread that is definitely not mine has 100% CPU load basically all the time. (I waited a few minutes, yes minutes, for it to finish while not using the app at all and it does not stop.) Component utilization shows that most the energy impact is CPU and "overhead" is very low (goes to 0 quickly). There is no network activity visible, so this seems to be some kind of background processing. Also, memory is very, very low (~ 35 MB). I am wondering if I am doing something wrong here or if there is a better practice. Some info about how my app works: It downloads things from the web and generates a lot of entities while doing so. It frequently saves changes (incremental changes in entities, there are lots of save() calls during a refresh). I have not had PersistantHistory enabled before changing my processes to work with iCloud (existing sqlite store). Not sure if anything else is relevant. Any help is appreciated. A bit of log: CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedExportWithLabel:activity:completionHandler:](2958): <NSCloudKitMirroringDelegate: 0x281d34680> - Beginning automated export - ExportActivity: <CKSchedulerActivity: 0x2805bf2f0; containerID=<CKContainerID: 0x282950510; containerIdentifier=iCloud.app.***, containerEnvironment="Sandbox">, identifier=com.apple.coredata.cloudkit.activity.export.368A54A8-5EA2-4177-B6DD-5404550042AD, priority=2, xpcActivityCriteriaOverrides={ Priority=Utility }> CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate executeMirroringRequest:error:](884): <NSCloudKitMirroringDelegate: 0x281d34680>: Asked to execute request: <NSCloudKitMirroringExportRequest: 0x28337ed40> 3052F013-BA85-4BB8-8935-74F829AACA4B CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _scheduleAutomatedImportWithLabel:activity:completionHandler:](2922): <NSCloudKitMirroringDelegate: 0x281d34680> - Beginning automated import - ImportActivity - in response to activity: <CKSchedulerActivity: 0x28057a3f0; containerID=<CKContainerID: 0x282900300; containerIdentifier=iCloud.app.***, containerEnvironment="Sandbox">, identifier=com.apple.coredata.cloudkit.activity.import.368A54A8-5EA2-4177-B6DD-5404550042AD, priority=2, xpcActivityCriteriaOverrides={ Priority=Utility }> CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate executeMirroringRequest:error:](884): <NSCloudKitMirroringDelegate: 0x281d34680>: Asked to execute request: <NSCloudKitMirroringImportRequest: 0x2833664c0> 98E2628F-6AE5-43C0-BA9E-2B72707B31DC Profile of what that thread is doing (inverted):
Replies
0
Boosts
1
Views
1k
Activity
Nov ’21
Battery drains unreasonably fast on M1 Macbook Air
Just wondering anyone else running macOS Monterey developer beta 2 or 3 is noticing excessive battery drain? I've filed feedback, FB9400649, regarding this. Tentatively believe this is due to Spotlight running away with the CPU: even while the lid is closed. Note that this M1 MacBook Air is not brand new, and Spotlight months ago built the initial index of the drive. Force-quitting Spotlight in Activity Monitor temporarily resets CPU usage, but after a couple of hours, it is back up to 130 to 180% of the CPU.
Replies
1
Boosts
0
Views
1.3k
Activity
Nov ’21