Library of useful links, tips and hacks that I use.
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts
-
GCD is a lightweight way to represent units of work that are going to be executed concurrently. You don’t schedule these units of work; the system takes care of scheduling for you. Adding dependency among blocks can be a headache. Canceling or suspending a block creates extra work for you as a developer!
-
Operation adds a little extra overhead compared to GCD, but you can add dependency among various operations and re-use, cancel or suspend them.
dispatch_block_t work = dispatch_block_create(0, ^{
NSLog(@"Hello.");
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), work);
dispatch_block_cancel(work)
classes
and blocks
are involved in ARC(Automatic refernce counter).
ARC counts only strong refernces to the object insntances and deallocates it, when count become zero.
By default all references are strong
var a: A = A()
To prevent counting you can use weak or unowned references
Class references stay in Run Time Stack (RTS) and their instances stay in Heap area of Memory.