I have written a book about releasing apps outside the Mac App Store. It comes with two fully working sample applications to cover checkout from within the app, licensing, and locking the app after a trial period.
Make Money Outside the Mac App Store: How to Sell Your Mac App with FastSpring, Secure It With License Codes Against Piracy, and Offer Time-Based Trial Downloads.
I’d love to have feedback on this.
If you want to help out, just shoot me a line at: email@example.com
P.S.: The secret Leanpub page is here.