added createDocument. Updated iOS example