What you say in your iMessages may be somewhat private and safe from the prying eyes of law enforcement, but the people you have in your contacts list isn't. In fact, Apple logs your iMessage contacts almost every time you enter a new number to start a message. Sam Biddle at The Intercept reports that Apple logs and stores phone numbers and IP addresses of all your iMessage contacts every time you enter a number into your iPhone to start a text conversation. The Messages app contacts Apple's servers to determine whether the message will be sent over SMS or iMessage, and during that exchange, Apple logs metadata that includes every one of your iMessage contacts — regardless of whether you've ever contacted them or not. The log also includes the date and time when you entered the number, as well as your IP address. These logs are then stored for a period of 30 days and can be handed over to law enforcement with a court order.
This isn't exactly new since a lot of companies capture data passing through their systems and share it with law enforcement. But it's important to know that while the content of your iMessages may be private and encrypted, who you can contact and who you've been contacting isn't. The whole report is worth a read, so check it out at the link below.