Modern encryption algorithms have become difficult to crack, including the algorithms used by commercial products such as WhatsUp. Several of the apps with encrypted messaging have been used by terrorists for communication (e.g. before the Paris attacks) and are virtually uncrackable for small numbers of messages. The way most spy agencies would go about getting information off a locked smart phone involves taking the phone apart and removing the flash chip which holds the data. They would at this point be able to attempt codes as many times as they like to decrypt the data without danger of erasing it.
I've moved on and so has he. At least we now know we all must sacrifice when American lives are at stake.
Wiretaps. Pen register. Subpoenas for emails from your ISP. All perfectly legal once the judge signs the order. This is the digital-equivalent. There is no legal basis for Cook to deny the request.