【发布时间】:2017-01-06 21:31:30
【问题描述】:
我正在#iOS 中制作一个应用程序,用户可以使用应用程序记录他的消息。现在我想将此消息保存在数据库中并检索它,以便其他用户也可以收听此消息。
现在我是这样保存的:
//audio file save
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"audioFile.aac"]; // Where ext is the audio format extension you have recorded your sound
[player.data writeToFile:filePath atomically:YES]
我可以将文件保存在本地。我如何保存它以便其他用户可以通过应用程序访问它??
如何将 iPhone 上生成的语音笔记保存到远程数据库??
【问题讨论】:
-
你可以用 cloudkit 做到这一点。
-
您必须将语音笔记上传到服务器
标签: ios objective-c iphone voice-recording