Storing audio files in Realm database

735 views
Skip to first unread message

Nursultan Bagidolla

unread,
Jan 18, 2015, 6:12:26 AM1/18/15
to realm...@googlegroups.com
As I previously mentioned in other topic, I am building the phrasebook app in Swift with Realm. This phrasebook's phrases will contain audio pronunciation. I want to store audio files in database. Is it possible?
My app will work offline, so all audio files will be saved in app.

Иван Персидский

unread,
Jan 18, 2015, 6:42:17 AM1/18/15
to Nursultan Bagidolla, realm...@googlegroups.com
Why do you want this? Why not to save files to the file system and store their names in database?



On Sun, Jan 18, 2015 at 2:12 PM, Nursultan Bagidolla <bagi...@gmail.com> wrote:

As I previously mentioned in other topic, I am building the phrasebook app in Swift with Realm. This phrasebook's phrases will contain audio pronunciation. I want to store audio files in database. Is it possible?
My app will work offline, so all audio files will be saved in app.

--
You received this message because you are subscribed to the Google Groups "Realm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to realm-cocoa...@googlegroups.com.
To post to this group, send email to realm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/realm-cocoa/240fe86a-4940-4e02-8f26-79f7b00277ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nursultan Bagidolla

unread,
Jan 18, 2015, 7:13:38 AM1/18/15
to realm...@googlegroups.com
А как это реализовать, не подскажете? Я просто совсем новичок в этом, делаю дипломный проект)

воскресенье, 18 января 2015 г., 17:12:26 UTC+6 пользователь Nursultan Bagidolla написал:

Иван Персидский

unread,
Jan 18, 2015, 7:32:00 AM1/18/15
to realm...@googlegroups.com
There are a lot of manuals that explains how to work with file system in iOS (like this http://nshipster.com/nsfilemanager/).
So, in your task, you should download the file from your server, then move it to desired directory in file system, and then save his name in database. That is.

Thus, you have all that you need. Hope, you will.

воскресенье, 18 января 2015 г., 15:13:38 UTC+3 пользователь Nursultan Bagidolla написал:

Nursultan Bagidolla

unread,
Jan 18, 2015, 7:39:17 AM1/18/15
to realm...@googlegroups.com
Thanks! ))


воскресенье, 18 января 2015 г., 17:12:26 UTC+6 пользователь Nursultan Bagidolla написал:
As I previously mentioned in other topic, I am building the phrasebook app in Swift with Realm. This phrasebook's phrases will contain audio pronunciation. I want to store audio files in database. Is it possible?
Reply all
Reply to author
Forward
0 new messages