Speed up Gradle build times by enabling the Gradle Daemon
echo org.gradle.daemon=true >> ~/.gradle/gradle.properties
| import android.annotation.TargetApi; | |
| import android.os.Build; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.LinkedBlockingQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; | |
| /** | |
| * Created by Grantland Chew on 11/14/13. |
| // source: http://stackoverflow.com/questions/7841610/xcode-4-2-debug-doesnt-symbolicate-stack-call | |
| void uncaughtExceptionHandler(NSException *exception) { | |
| NSLog(@"CRASH: %@", exception); | |
| NSLog(@"Stack Trace: %@", [exception callStackSymbols]); | |
| // Internal error reporting | |
| } | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { |
| To fix the following warning, you must add "-keepattributes EnclosingMethod" to your proguard config. | |
| Dx warning: Ignoring InnerClasses attribute for an anonymous inner class | |
| (me.kiip.internal.c.h) that doesn't come with an | |
| associated EnclosingMethod attribute. This class was probably produced by a | |
| compiler that did not target the modern .class file format. The recommended | |
| solution is to recompile the class from source, using an up-to-date compiler | |
| and without specifying any "-target" type options. The consequence of ignoring | |
| this warning is that reflective operations on this class will incorrectly | |
| indicate that it is *not* an inner class. |
NSURLCache uses more than just the HTTP method and URL properties of NSURLRequest as the key for its cache. Therefore, it is possible for a request with method=GET and URL=X to return a miss with NSURLCache even though a NSCachedURLResponse was stored with method=GET and URL=X. These misses can be caused by non-http properties of NSURLRequest being different than the NSURLRequest used to store the NSCachedURLResponse.
We've seen the following show up as a miss:
NSURLCache * cache = //...
NSURL *url = [NSURL URLWithString:@"http://example.com"];
NSURLRequestCachePolicy cachePolicy = NSURLRequestReturnCacheDataElseLoad;
NSURLRequest r1 = [NSURLRequest requestWithURL:url cachePolicy:cachePolicy timeoutInterval:30];
NSURLRequest r2 = [NSURLRequest requestWithURL:url cachePolicy:cachePolicy timeoutInterval:60];
| /data/data/com.android.providers.settings/databases/settings.db | |
| select * from secure where name='android_id' |
| SharedPreferences information in a xml file in plain text | |
| to find it: | |
| /data/data/<package>/shared_prefs/ | |
| generally default.xml but may be another file |
| standardUserDefaults stores information in a plist file in plain text | |
| To find it: | |
| cd /User/Applications/ | |
| grep <app name> * | |
| /User/Applications/<random string>/Library/Preferences/<bundle id>.plist |
| [...] = starting state | |
| States: | |
| not running (dead) | |
| onResume (running) | |
| onStop (minimized) | |
| onPause (screen off) | |
| Launch Application: |