Author: andras.palfi

Strange UIAlertView crash

On iOS8+ presenting an AlertView can lead to a crash: NSInternalInconsistencyException what you cannot really catch. Spending quite some time around this I realized the issue comes when the keyboard is open. Closing the keyboard (endEditing) solves the issue. I also found a good thread about this at stackoverflow  

Strange issues with certificates on iOS

Good to know: in case of HTTPS/SSL/TLS connection iOS devices cache the used certificate. The side effect come along when you create (get) certificate at runtime and try to use them to connect to a server. The first time you get the certificate challenge, but not the second time – at least if you try […]

const pointer to const memory… what?

After several years I found lots of people – and me 🙂 – still confused about the pointer declarations – if it contains some const keyword somewhere. So const char * or char const * or char * const still confusing. To keep it simple: read it backward as this excellent post describes: Clockwise/Spiral rule So: const char * is equivalent […]

ARC-Block-Avoid retain cycles and crashes

Using blocks which captures self (explicitly or automatically by referencing an iVar!) you have the chance to a retain cycle where the block keeps self and self keeps the block or a crash when self is released. This is true for Obj-C as well as for Swift. The proper usage declared by Apple itself: store […]