gpt4 book ai didi

ios - NSData.writeToURL 不适用于 iPhone

转载 作者:行者123 更新时间:2023-11-29 01:41:44 26 4
gpt4 key购买 nike

我正在 iPhone 5s 上测试我的应用程序,在此应用程序中我使用 NSData.writeToURL(destinationUrl, atomically: true) 保存音频文件, 但这条线不起作用。

destinationUrl 是如何生成的:

let documentsUrl =  NSURL(fileURLWithPath: NSBundle.mainBundle().resourcePath!)

let fileName = remoteFileUrl.lastPathComponent

let destinationUrl = documentsUrl.URLByAppendingPathComponent(fileName)

在 iOS 模拟器中测试时 - 一切正常

我该如何解决?

最佳答案

您不得在运行时向应用程序包中写入任何内容。
这将破坏应用程序的代码签名。

关于ios - NSData.writeToURL 不适用于 iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32318658/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com