Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rejected App, Watchdog timer or missing entitlement

Tags:

xcode

ios

iphone

So I have an app that has twice been rejected from the app store and I really could use some help!

It has been rejected for the Watchdog timer forcing it to quit when it is first opened. However I have not been able to reproduce this on any of my devices. It does take a long time to build to a device when using xcode (i know that when built from xcode the watchdog is disconnected). But I have a couple questions that might help me fix this.

  1. Does the watchdog take into account only didFinishLaunchingWithOptions: or are their other methods that it calls?

  2. Does the number of frameworks used by the program have anything to do with it? and if so is 11 frameworks just too many?

  3. Once the app is installed to a device, and I unplug said device is the watchdog timer re-enabled?

  4. What are some other things that can add to the watchdog timer?

Apple said that another possibility could be Another possibility could be a missing entitlement. Could someone please explain what this means, I hav'nt seen this before with my other apps but thought maybe it was something new? And does it have to be installed on all apps for the appstore?

Time Profile for first seconds

enter image description here

like image 256
James Dunay Avatar asked Apr 16 '12 12:04

James Dunay


People also ask

What is WatchDog on my Iphone?

Owners of WatchDog Stations and Retriever & Pups networks connected to the SpecConnect system can use the WatchDog Mobile app to manage their devices from installation and configuration to current condition monitoring.

What is Apple WatchDog?

The operating system employs a watchdog that monitors launch times and app responsiveness, and terminates unresponsive apps.


1 Answers

You are blocking the UI thread for too long. To solve this problem, first you'll need to figure out what code took that long. It might be worthwhile to profile your app. Note that the simulator doesn't emulate the device, it only emulates the API. It could run much faster than the actual device because your computer is more powerful than an iPhone. Try click and hold Run at top left of Xcode, and choose Profile. Choose Time Profiler and run for a few seconds. Stop the profiler to analyze timing in function calls. Note that you may need to dig deeper, find some tutorials or books to really understand profiling.

When you know what parts have been running slow. You can put them into a thread. The easy way would be to use Grand Central Dispatch. To get started, visit this tutorial. You can skip the first half and focus on the actual thread blocks. The APIs are dispatch_queue_create, dispatch_async and dispatch_release.

This will unblock your UI.

like image 134
He Shiming Avatar answered Oct 09 '22 16:10

He Shiming