简体   繁体   中英

iPhone app rejected due to battery usage and heat

My app got rejected for the following:

13.2 - Apps that rapidly drain the device's battery or generate excessive heat will be rejected

I have two guesses as to why it may have been rejected:

  1. My app is essentially a LED Candle app which uses a proprietary candle flicker algorithm. So it turns on/off the LED very quickly resembling a candle. Usage of the LED is obviously going to drain the battery faster than most apps would. So wouldn't the multitude of "LED Flashlight" Apps on the market.
  2. I have code which does recursive loops and looping code like this could be killing the battery?

    NSTimer.scheduledTimerWithTimeInterval(timeTillFlicker, target: self, selector: "candleFlickerLoop", userInfo: nil, repeats: false)

    Does creating loops like this with a timeTillFlicker around 0.0065 Seconds burn the battery down? Is there a better way to do this?

So of those two things, do you think either is the cause of this rejection by apple?

Does anyone have any advice on working through feedback like this?

Any advice would be greatly appreciated. I'm feeling pretty discouraged from this review process.

UPDATE: After getting rejected numerous times for numerous different reasons that were all kind of BS, I eventually received a phone call from Apple to tell me the real reason they are rejecting my app indefinitely. It is because I have created an app which uses the camera flashlight and they are no longer accepting any app which uses this as it's primary function. Their reasoning is that they already offer a 1st party flashlight application and don't want any others, even though my app really is not the same thing. I truly believe it is because there is a massive memory leak every time you turn on/off the back flashlight. In my tests I was able to identify that every time you turn on/off the light, it consumes memory and does not clean up after itself until eventually the app or phone crashes. I ended up giving up on this app due to basically being told "It will never be accepted regardless of what you change."

First of all don't feel discouraged. One of my applications, which has more than 1M users now, rejected because of excessive battery usage. My problem was using GPS(drains battery like crazy) a lot. After I figured it out, I changed the way I use it, and solved the problem.

Next time I sent it to review, it was accepted.

In order to figure out what your problem is, you can use the instruments tool.

You can follow Apple's tutorial on this one https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/MeasuringEnergyImpact.html

I'm not a mobile environment expert, but i'm so in other fields where performance is even more important (server-side systems).

I really do not know all the specifications for scheduling functions inside iOS, but what i can tell you is that i've seen recursive use of sceduling only for animations in javascript. Otherway should be used to scedule upcoming events that must occur in minutes, hours or days where a sellping thread would be senseless. But for your scenario (a thread oriented device) i will for shure build a thread and implement a recursive loop. Maybe scheduling is managed in such a way that increase the ram consumption and therefore battery. I'm shure that Apple is conscious of the high battery drain that flashlight perform. I think they rejected cause you produced a hotspot on the ram with scheduling.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM