I think I understand what you're asking (not 100% sure), but I'll try to answer anyway.The user can specify what language they want to have the keyboard in by going to Settings > General > International > Keyboard > Add New Keyboard > Japanese - 10-Key
, but you cannot programmatically change the keyboard language.
See the answers to these questions for further vindication:
Showing IPhone keyboard in different languages based on user input
- Unfortunately, you cannot control the language of the keyboard. The user chooses which keyboards they would like available via the settings application and can toggle between them using the globe icon on the keyboard. When the keyboard is opened it will open to the most recently used keyboard.
Setting the iPhone keyboard language
- This is a user defined setting and can not be messed with by the programmer, unfortunately.
So basically, you are correct in that it is homegrown.
However, I can point you in the right direction regarding where to start. I found this question on recognizing japanese handwritten input on the iPhone and this was the top answer (answer about Kanji, not Kana though):
iOS japanese handwriting input code help please
We worked on a similar exercise back at University.
As the order of the strokes is well defined with kanji and there are only 8 (?) different strokes. Basically each Kanji is a well-ordered sequence of strokes. Like te (hand) is the sequence "The short falling backward stroke" and then twice the "left to right stroke" and finally "The long downward stroke with the little tip at the bottom". There are databases that give you this information.
Now the problem is almost reduced to identify the correct stroke. You will still run into some ambiguities where you have to take into consideration in which spatial relation some strokes are to some others.
For stroke recognition we snapped the free hand writing to 45 degrees (Where is the little circle symbol on the keyboard?) angles, thus converting it into a sequence of vectors along one of these directions. Let's assume that direction zero is from bottom to top, direction 1 bottom right to top left, 2 from right to left and so on CCW.
Then the first stroke of te (手) would be [23]+ (as some write it falling and some horizontal) The second and third stroke would be 6+ and the last would be 4+[123] (as with the little tip, every writer uses a different direction)
This coarse snapping was actually enough for us to recognize kanjis. Maybe there are more sofisticated ways, but this simple solution managed to recognize about 90% of kanjis. It couldn't grasp only the handwriting of one professor, but the problem was that also no human except himself could read his handwriting.
It is important that your user "prints" the Kanji and doesn't write in calligraphy, since in calligraphy many strokes are merged into one. Like when writing a kanji with the radical of "rice field" in calligraphy, this radical morphs into something completely different. Or radicals with a lot of horizontal dashes (like the radical of "speech" iu) just become one long wriggly line.
Also, I found an open source project called Tegaki for Chinese and Japanese character recognition. You can download it here and view the documentation here. I'm not quite sure if it supports Kana, but you should check it out anyway.
Lastly, you can check out these other question for info on general handwriting recognition:
Hope this helps!