title: How to programmatically read incoming text messages on iOS
body: <p>There have been tons of questions on how to programmatically access the SMS messages stored in the iPhone. Doing a small research you will quickly and sadly find out that Apple won't let us developers touch the SMS API or SMS database due to obvious security reasons. Let's set this fact apart for a moment.</p>
  <p>I own a BMW car that comes equipped with a fantastic &quot;infotainment&quot; system called iDrive. Just recently I realized that I could actually read incoming text messages through the iDrive system when my iPhone is connected to the USB. That really intrigued me. After playing around with the car and the phone configuration, I finally figured out that the iDrive was actually displaying text messages from the Notification Center. This means that every time I get a new message, it would be displayed as a notification in the lock screen and the car would be able to access it because Notification Center has public APIs. As soon as I removed the Messages app from the notification, I got nothing back.</p>
  <p>As many of you have thought before, I also wanted to create an app that could monitor incoming text messages and take some action based on keywords scanned from the message body.</p>
  <p>Until now, I was really inclined toward moving to Android in order to set me free, however, watching the car displaying incoming text messages makes me see some light at the end of the tunnel.</p>
  <p>Does anybody have a clue on how to build an iOS app that can read entries from the Notification Center? I tried some research but this seems to be such a broad matter that it can be difficult to find specific documentation for iOS Notification Center.</p>
  <p>I should mention that I am not an experienced iOS developer, so any help will be very appreciated.</p>
  <p>BTW - I can never understand Apple official documentation support anyway. Kind of confusing to find a complete example of a running app.</p>
  <p>Thanks for the help.
  Fabio</p>
  <p><strong>UPDATE: It is already 2021, Apple is about to release iOS 15 and we still don't have an API that allow access to the SMS database.</strong></p>