Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Swift-如何从语音中保存文本文件_Ios_Swift_Text_Save - Fatal编程技术网

Ios Swift-如何从语音中保存文本文件

Ios Swift-如何从语音中保存文本文件,ios,swift,text,save,Ios,Swift,Text,Save,我正在iOS中开发语音到文本的应用程序 实际上我已经做了,但我的实际问题是,当语音转换为文本时,如何将文本文件保存在指定位置的txt中?guard let path=try?FileManager.default.url(用于:.documentDirectory, 在:.userDomainMask中, 适用范围:无, 创建:false) .appendingPathComponent(“Folder/File.txt”)或{ 返回 } 尝试“Text”。写入(to:path,原子性:fals

我正在iOS中开发语音到文本的应用程序


实际上我已经做了,但我的实际问题是,当语音转换为文本时,如何将文本文件保存在指定位置的txt中?

guard let path=try?FileManager.default.url(用于:.documentDirectory,
在:.userDomainMask中,
适用范围:无,
创建:false)
.appendingPathComponent(“Folder/File.txt”)或{
返回
}

尝试“Text”。写入(to:path,原子性:false,编码:.utf8)

您好!这回答了你的问题吗?您的问题实际上是关于如何保存文本文件。所以这可能会有帮助:这能回答你的问题吗?