Thanks for your code. Great idea!
It contains a bunch of leaks though. Maybe you should put on the Static Analyser (check your build settings). These are the leaks that the static analyser detects:
• unreleased UIAlertview (line 185) -- after show, it should be released
• testConnection (line 83) -- should be released
• Appirater unreleased (line 93) -- after detaching a new thread, it can be auto-released (it's retained by the thread)
M
Comments
martijnthe March 23, 2010 | link
Ah, I see now that you release the UIAlertView and self in the alertView:clickedButtonAtIndex: delegate method. I'd say this is a bit unconventional...
There are a few issues in + (void)appLaunched:(BOOL)canPromptForRating.
[device respondsToSelector:@selector(multitaskingSupported)] always returns false. This is because the getter is called isMultitaskingSupported,
[device respondsToSelector:@selector(isMultitaskingSupported)] works fine.
On at least iOS 4.0.1 I do not get a call on applicationWillEnterForeground: on my delegate on first launch. (But I do get it on switching to the application if it is running.) This means that if the first issue is fixed, the initial launch on multitasking environments may not be recorded.
P.S. This is a great piece of code, keep up the good work!