Creating a song in iOS

I’ve created a song in my game with unity. Now I want to save it and play it with the music player of iOS and the posibility to transfer it with itunes to my computer. How can I do it?

So you want to create an MP3 file inside Unity, and copy it to devices media library?

Yes, it is. I don’t care too much the format file, I just want to play this song wherever he wants.

You can save a WAV file with following code

to copy the file to music library requires jailbroken device
https://github.com/H2CO3/MFMusicLibrary

Thank you. Probably I’ll make a system to transfer through internet because I can’t ask to the players to do jailbreak the device. But thank you for the examples.