iOS Battery Optimization Best Practice

About This Presentation
Title:

iOS Battery Optimization Best Practice

Description:

This PDF will explain you about the aspect through which you can optimize your iOS based app to reduce the battery consumption in the best manner. – PowerPoint PPT presentation

Number of Views:7

less

Transcript and Presenter's Notes

Title: iOS Battery Optimization Best Practice


1
Minimise the Burden on Battery
  • iOS Application Battery Optimization Techniques

2
How to Increase an iPhone Battery Usage
  • People find battery a serious concern but few iOS
    app designing tips
  • and can easily extend the battery usage of an
    iPhone without
  • compromising the . Perhaps the most ignored tip
    is keeping your
  • iPhone beyond the reach of hot sun or avoid
    leaving it in a hot car.
  • Heat shortens the batterys performance
    significantly

3
Turn Down the Volume
  • In order to minimize the impact of audio on your
    iphone it is recommended to turn down your volume
    as well as prefer headphones when
  • Possible. Go to SettinggtMusic to set a volume
    limit as well as to turn off the EQ in order to
    save even more battery

4
Stop the Location Services
  • It is evident that when your iphone is used to
    track location then it drains huge amount of
    battery. You can stop this by going into
    SettinggtPrivacygtLocation Services and turn off
    any app that you dont want should track you.
    Going a step further you can also turn off the
    Frequent Location, Diagnostic and Usage and
    Location-Based iAds by going into
    SettinggtPrivacygtLocation ServicesgtSystemServices

5
Turn Off Unnecessary Animations
  • Parallax effect and Dynamic Wallpapers are for
    sure two very attractive thing on your iPhone but
    impact your iPhone Battery very negatively.
  • Once you put a pause on these it will surely
    save you substantial amount of battery. To do
    this go to SettingsgtGeneralgtAccessibility and
    turn on the Reduce motion. Now go to
    SettingsgtWallpapers Brightnessgt Choose
    Wallpaper and select some static wallpaper

6
Turn Off Unnecessary Animations
  • Parallax effect and Dynamic Wallpapers are
    animated using information via iPhones sensors
    about the way in which you are holding and moving
    the phone hence these effect drain a substantial
    amount of battery

7
Do the Download Beforehand
  • There are multiple movie and music streaming
    services where option to download the data for
    offline listening and viewing is available.
    Streaming data using the iPhone data pack will
    put extra burden on the device battery. Now
    downloading ahead of time you want it will enable
    your battery to go further.

8
Smart Prioritization for Remote Notification
Delivery

9
Smart Prioritization for Remote Notification
Delivery
  • There are multiple elements contained within the
    remote notifications delivered by the server to
    Apple Notification Service like payload data, an
    expiration date and a priority. Notifications can
    be delivered immediately or can be scheduled for
    an energy-efficient time. Here using two levels
    of push priority you can you can decide which
    notification to be delivered instantaneously or
    need to be sent later.

10
Discover those Services and Characteristics that
You Actually Need
  • A peripheral usually has more than enough
    services to perform specific use case in an app.
    It is therefore, recommended to figure out the
    particular services and characteristics required
    by your app. This can be done using particular
    UUIDs to discover services and
    discoverCharacteristicsforService methods of
    the CBPeripheral class

11
Discover those Services and Characteristics that
You Actually Need
  • Discovering particular services
  • OBJECTIVE-C
  • // Look for services matching a specific set of
    UUIDs
  • peripheral discoverServices_at_firstServiceUUID,
    secondServiceUUID
  • SWIFT
  • // Look for services matching a specific set of
    UUIDs
  • peripheral.discoverServices(firstServiceUUID,
    secondServiceUUID)

12
Discover those Services and Characteristics that
You Actually Need
  • Discovering particular service characteristics
  • OBJECTIVE-C
  • // Look for characterstics matching a specific
    set of UUIDs for a given service
  • peripheral discoverCharacteristics_at_firstCharac
    teristicUUID, secondCharacteristicUUID
  • forServiceinterestingService
  • SWIFT
  • // Look for characterstics matching a specific
    set of UUIDs for a given service
  • peripheral.discoverCharacteristics(firstCharacter
    isticUUID, secondCharacteristicUUID, forService
    interestingService)

13
Disconnect from the Device When You Don't Need It
  • To avoid your app from meaninglessly using the
    devices radio simply disconnect it from a
    peripheral device if some characteristic is no
    longer providing notifications or even if the
    extra data is not required anymore. Cancel every
    notification subscriptions by passing a value of
    NO to the setNotifyValueforCharacteristic
    method of the CBPeripheral class. Now disconnect
    from the device by calling the cancelPeripheralCon
    nection method of the CBCentralManager class

14
Disconnect from the Device When You Don't Need
  • OBJECTIVE - C
  • // Unsubscribe from a characteristic value
  • self.peripheral setNotifyValueNO
    forCharacteristicinterestingCharacteristic
  • // Disconnect from the device
  • self.myCentralManager cancelPeripheralConnection
    peripheral
  • SWIFT
  • // Unsubscribe from a characteristic value
  • self.peripheral.notifyValue(false,
    forCharacteristic interestingCharacteristic)
  • // Disconnect from the device
  • self.myCentralManager.cancelPeripheralConnection(p
    eripheral)

15
Multiple factors affect the amount of energy
required to do the network operations on a device.
  • Cellular network activity requires much more
    energy than performing an activity over Wi-Fi.
  • Poor or fluctuation in signal conditions may
    result in slow or problematic transactions, which
    must be avoided.
  • Low network throughput (bandwidth) means radios
    need to stay more than usual for performing the
    transactions.
  • The geographic location and preferred cellular
    provider can affect the amount of energy
    consumption because signal conditions and
    throughput vary very often.

16
Networking Variable Effect on the Energy
17
Guideline for content refresh optimization
  • Try to limit the number of views your app uses.
  • Avoid using opacity especially for the content
    that changes frequently.
  • Prefer only recommended frameworks while
    developing games. These frameworks are optimized
    to provide good performance.

18
(No Transcript)
Write a Comment
User Comments (0)