CryptoSwift 0.1.0

Finally major update to CryptoSwift framework. Crypto related functions and helpers for Swift implemented in Swift. I really enjoy working on CryptoSwift in my spare time, this is why today I'm glad to announce version 0.1 with a major changes to the public API and to the internal state…

Generic Array of Int - what, why, how?

One of the great feature introduced by Swift 2.0 is possibility to define generic functions for type of Array. Array is container for values of some type. The type is known upfront. It's called Element now. what? Array is a struct with element and is defined like this: struct…

Fast pattern search in Swift... since 1974

the fastest known ways to find one string of characters in another Stay with me. At the beginning brief introduction, later on Swift implementation, tests and conclusion. Halt and Catch Fire thing I really enjoy Halt and Catch Fire tv show. Season 1 was about hardware, while season 2 is…

How to change iCloud password in 57 steps

First you have to find screen of horror, like the one I saw during activation my new iPad. Now sit back, brew a cup of tea and relax. You need it all to survive process of changing password designed by Apple. If happened you on you Mac at the moment,…

Collection Index and magic factor

An index is an indirect shortcut derived from and pointing into, a greater volume of values, data, information or knowledge. (wikipedia) In general (however it is not the rule) in modern programming languages Index values start at 0 position and ends at "length - 1" position. A lot of fathers…

ObjectivePGP goes Open Source

I have changed my mind I'm a just developer who like to make stuff. A few months ago I stated: Nowadays, programmers are looking for (I have seen it particularly in the case of iOS programmers) ready-made controls and libraries to be used in another project for their clients. There…

Practical Swift: pages generator - build once, use many

In the real world, at some point, we all have to deal with data that is fetched from a backend service, page by page. It's called paging. Everybody does this! Nothing to be ashamed of ;-) Here is one of the ways in which a Swift pattern (well, not specific…

Swift optimizer considered harmful

For some time I struggled with one weird bug reported to CryptoSwift. Few people report that sometimes they got mangled result of decryption with AES. Turn out the code that produce mangled output was PKCS7 class, with part responsible for removing padded bytes. this very function: public func remove(bytes:…

CryptoSwift, the talk

Earlier this year I gave talk named "CryptoSwift: Cryptography You Can Do". The video was recorded on Swift Summit Conference in London, earlier this year. Thanks to realm.io and Swift Summit team, transcript, video and presentation is available online. I encourage you to check it here: https://realm.io/…

Let's talk about sections for NSTableView

Today, let's talk about table view in AppKit for OS X. Programming for OS X have a long history behind. History that is not always known to the iOS programmers, however it is the Mother of UIKit. An NSTableView object displays data for a set of related records, with rows…

Photos - you do it wrong Apple. In 2015.

If you'll ask me today, after a few months, how do I feel about Photos and iCloud Photo Library, I have just one answer: I'm pissed off, give me my money back! I can honestly state that I use full Apple setup. Macbooks, iMac, iPhones, iPad, apple tv - it's…

Natalie - Storyboard Code Generator

A strongly-typed language like Swift is a big blessing. I truly love how refactoring of code becomes a less scary operation. Today if I change the type of a variable, it won't compile (ok, I can hear you ask about "Any"... just don't), and when it won't compile, it won't…

Swift: Raw{Not}Representable enum

Preconditions: Xcode Version 6.3 (6D532l), Swift 1.2 In Swift An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within yout code | Enumerations are first-class types in their own right. Use enum to create…

Swift asserts - the missing manual

assertion - a confident and forceful statement of fact or belief. Something declared or stated positively, often with no support or attempt at proof. The assertions are neat debugging tool. Whenever I need to check my code against condition that is expected to be met, I can use assertion and…

Swift: Madness of Generic Integer

Handling Integers with Swift is not the easiest task. Especially when I need the generic function that can do some work on any kind of Integer. There are 11 Integer types that can be considered as Integers: Int8 UInt8 Int16 UInt16 Int32 UInt32 Int64 UInt64 Int UInt Bit (I'll skip…

Google sign-in with 1Password

I'm heavy user of 1Password. This is great tool, with all my password. Since iOS 8.0, 1Password gave me extension so now I can login to applications with 1Password, without typing my login details (I use really long login). This is great solution and I would recomend it to…

Shutting down postalcard.mobi

One of my New Year's resolution this year is to close all abandoned projects. Postalcard.mobi is shutting down. Actually it never was up and running for real. I mean, it was running, but not fully as a I imagined it will. In assumptions the project consists of iOS app.…

How to install and use CryptoSwift

Some people asking question regarding installation of CryptoSwift with CocoaPods. The trick is... you need (as for today) install "Pre" version of CocoaPods tools, because only this version have support for Swift frameworks. I know it's kinda confusing that you can install swift Pods with the older toolset, and then…

Various ways to parse raw data with MKDataScanner

Recently I did some more work with raw data and I missed simple tool like NSScanner to do the job. So I created MKDataScanner, which is NSScanner but for NSData (byte by byte) and for raw file content. It's not a big deal, just at tool I want use to…

Privacy — PGP Messenger

Today, I’m launching Privacy on AppStore. My weekend project. It’s the most convenient way to use OpenPGP. For those who don’t know what PGP is I can say this way: it’s something that Edward Snowden failed because he couldn’t force journalist Glenn Greenwald to use…