Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Mike Hansen
Python Web Development Techdegree Student 3,419 PointsI want to make a iPhone app where you can upload music and people can hear it
Hi, i want to make an app for my friends moms company but i'm not sure how to make it. but it should be fairly simple though.
The app should work like this: His mom can go into the app and upload music herself, and then people can listen to that music as a preview and if they like it they can buy it. That's it really, there is no other people that should be able to upload music though, only her.
i'm right now thinking of something like making a website for it then connect the iPhone app to that website.
But i'm new to IOS programming so i don't know what would be more easy.
Regards, Mike
1 Answer
ianhan3
4,263 PointsRecording from the mic wouldn't be the suggested way since you would be recording a recording. Dustin is right you'll have to store your files somewhere - you can definitely use Firebase Storage for the audio files and the DB to point to the correct locations. I've used Jukebox before as a great out-of-the-box solution to playing audio off a link.
My suggestion would be to set up some client facing site where she can upload her music. Trying to do it from the phone may be pretty cumbersome and you'd have to do a lot of custom work for what is necessarily one person using it. From a consumer side, the easiest way is probably to fire a timer off at the 30 second mark (or whatever you want the preview to be) to stop the audio player and reset. Purchasing would unfortunately fall under digital goods, meaning you'd have to use IAP's and Apple is going to take a 30% cut.
If you want to make a website then connect it to the website that's fine but make sure the app has its own functionality. Apple prohibits apps that function basically only as a UIWebView.
Mike Hansen
Python Web Development Techdegree Student 3,419 PointsThanks for the answer, i didn't mean to record from the mic though. I did mean making a website maybe where she can upload mp3 files and then gonna do the whole purchase thing, on the app.
But i am new to IOS development so it's defiently gonna be difficult, but i believe i can do it :)
Dustin Spengler
5,480 PointsDustin Spengler
5,480 PointsThats a pretty broad question so really hardest part is finding step one. The first thing i would personally do, is figure out how to obtain input from the microphone. I haven't tested any of this code, just glanced at it, but it might be a good start.
https://www.hackingwithswift.com/read/33/2/recording-from-the-microphone-with-avaudiorecorder
Once you have the recording, you'll probably want to upload it to a database (I personally use Firebase) and so on.