Exchange Activesync support on iOS

We have a custom iOS/iPad app with a thin custom mail client. I am aware of the iOS API that can configure and setup the account at device level. We want to add Exchange ActiveSync support to it so that mail can get pushed to our app. How do we achieve this?