Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JPfowl

macrumors newbie
Original poster
Sep 29, 2013
11
0
I am new to programming in iOS and am taking a class on it. I currently have a grasp on the basics but I want to learn specifically about music player. My end goal is to create a program that allows users to select a portion or all of their music and add it to the library and then play music. During playback they would be able to assign tags to their music like "quiet" or "happy" (any tag they can type at least). These tags wouldn't be assigned to the point in time they are listening but to the whole song. There would be another mode where they can view tags and the songs associated with them. The problem I have is that there is no documentation of the music code except for code that is iOS 5 and earlier. Can anyone point me to some guides or tutorials or would you be willing to work with me on this app? (I'm not planning on selling this app. It's meant to be for school. I should be able to do most of the code but I need a basic grasp of the music player code.)
 
You may try this tutorial

Hi,
let's start with this tutorial. It should allow you to catch the basic understanding and it is a great starting point for the app you're planning.

happy coding!
Les
 
Hi,
let's start with this tutorial. It should allow you to catch the basic understanding and it is a great starting point for the app you're planning.

happy coding!
Les

I saw that tutorial before but didn't follow it up. After checking it out it seems that that was for a previous version of Xcode and of iOS. In the current version of Xcode (5.0.1) and iOS (7.0.2) there are several elements that do not run.
 
I saw that tutorial before but didn't follow it up. After checking it out it seems that that was for a previous version of Xcode and of iOS. In the current version of Xcode (5.0.1) and iOS (7.0.2) there are several elements that do not run.

This is going to be a problem for some time to come. The book and tutorial authors have a very hard job, keeping up with the rapid advance of Apple tools and OS versions.

Xcode 5 just came out, and I don't know of any books that have been released yet that cover it. I'm doing tech review on one that's in the pipeline, but it will probably be a couple more months before it hits the bookshelves.

When you're first starting out, anything that differs from the way a lesson is written is likely to stop you dead, since you don't have the foundation to understand what's different and why, and how to adapt. As you gain more experience you become more flexible and better able to adapt to changes in the tools and OS frameworks.

I would suggest downloading Xcode 4.6.3 and using that for now, plus targeting iOS 6. Once you come up to speed, the transition to Xcode 5 and iOS 7 should not be too bad. (Unlike the transition from Xcode 3 to Xcode 4, which was truly horrible.)

Assuming you've registered as a developer (free developer or paid, it doesn't matter) then you should be able to find Xcode 4.6.3 on the developer site. My wife is trying to learn iOS development and she was having the same problem you are. I showed her where to find Xcode 4.6.3 on the Apple developer site just a few days ago.

If you do that, you should find plenty of tutorials and books that you can use exactly as written.
 
If I target iOS 6 then will I be able to deploy to my iPhone which is running iOS 7? I thought it would not work which is why I had upgraded.
 
If I target iOS 6 then will I be able to deploy to my iPhone which is running iOS 7? I thought it would not work which is why I had upgraded.

Yes. The UI won't fit in with the rest of iOS 7's, but that's about all.
 
Last edited:
Hi,
let's start with this tutorial. It should allow you to catch the basic understanding and it is a great starting point for the app you're planning.

happy coding!
Les

I've been trying this tutorial but I am stuck at the end of step 5. I get it to run, but none of the PNG's load.

Edit: reloaded PNG's and now it runs.
Edit 2: I finished all the steps and when I run it crashes throwing this error:
2013-11-04 15:05:34.392 Music[64008:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MusicViewController 0xa278900> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key songLabel.'
*** First throw call stack:
(0x2321012 0x13ace7e 0x23a9fb1 0xe58e41 0xdda5f8 0xdda0e7 0xe04b58 0x50e019 0x13c0663 0x231c45a 0x50cb1c 0x3d17e7 0x3d1dc8 0x3d1ff8 0x3d2232 0x3213d5 0x32176f 0x321905 0x32a917 0x2465 0x2ee157 0x2ee747 0x2ef94b 0x300cb5 0x301beb 0x2f3698 0x1bc3df9 0x1bc3ad0 0x2296bf5 0x2296962 0x22c7bb6 0x22c6f44 0x22c6e1b 0x2ef17a 0x2f0ffc 0x219d 0x20c5)
libc++abi.dylib: terminate called throwing an exception
(lldb)

Edit: I've searched online and it seems to be that my nib doesn't have the right class name. Does anyone know what class name it should be? I've uploaded my project so you can look at it.

Edit 2: I've fixed the error as my nib had some incorrectly referenced outlets. I get the app to work and to play music but the labels do not update. Re-attached latest archive.View attachment Archive.zip

Edit 3: I saw that the label's were not long enough to display the full text. No problems!

Edit 4: Ok, done with the music aspect, now let's move onto databases. Part of the app is supposed to be able to create tags for songs and then call all the songs that have the tag a user picks from a picker. I want to just learn the basis for this with a simple app to create tags. I think the only way you can do this is to use a database. I don't know a single thing about it though. Can anyone help me find a tutorial or even teach me? Also, does anyone know how to add all of your music to a third part app? In my musicplayer and many others you can only add a song at a time in the iPod library. Is there a way to code in the app an ability to add all music? Thanks again for the help, I'll be sure to mention you guys in the app if it's ever finished.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.