My understanding is that Jack Dorsey had the idea but didn’t know how to do it, as in, had no experience with the Bluetooth stack.
I think he used https://github.com/block/goose and it produced something that worked. And, without knowing how it worked, he pushed to the App Store.
Pretty cool way...