0
我正在#iOS中创建应用程序,用户可以使用应用程序记录他的消息。现在我想将这条消息保存在数据库中并检索它,以便其他用户也可以收听此消息。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做到这一点。 –
您必须将语音笔记上载到服务器 – rafaperez