I've seen ARkit and I've seen the demo for animoji on the keynote, but I'm wondering if there is a way to create your own animoji (that will work within messages) within Xcode.
You can use ARKit
to provide facial movement data to animate your own 3D models. In conjunction with an iMessage app, you should be able to export videos of animated characters similar to animojis.
Take a look at ARBlendShapeLocation
(documentation) which provides high-level facial feature detection. You could track these features and use them to animate your models.
I'd also recommend watching the recent Apple developer video called "Face Tracking with ARKit" (link) which gives a good overview of the API's available.
When you're ready to jump right in, start with this face-tracking sample code (link) from Apple. (thanks @rickster)
Note that these features are only available on the new iPhone X.