Apple has removed an AI chatbot from the App Store after it sent inappropriate messages to children.