Choose Music from iPhone app? - iPhone SDK - objective-c

Can anyone give me a head starters on this question. How would I be able to make an app that searches through your music contents that are already synced on your phone and play them. I don't want to do a scroll view, where the user just presses on the options. Instead I want the user to type the song name and if the song is found it will play it.
thanks,
kevin

The class you are looking for is MPMusicPlayerController. It's only available in iPhone 3.0 and above.
Get the instance for your app ([MPMusicPlayerController applicationMusicPlayer]) rather than the iPod instance. You can use this to play the songs once you've located them.
In order to do your own search rather than presenting the typical interface check out MPMediaQuery.
I found this article helpful. It's mostly about iPod player integration, but it touches on these other topics too.

Related

NSStatusItem app development

I'm beginning some OS X development, I am reasonably accomplished with objective C and UIKIT.
There doesn't seem to be as much online about moving from iOS development to OS X as I thought there would be!
Anyway, I found a decent tutorial over a Ray Wenderlich, that basically explained the differences, (multiple NSWindows, then add to them NSViewControllers etc)
What I would like to do is make a little app that shows info in the status bar (beside the Wifi icon etc)
Basically all it does is have an NSStatusitem that has it's title set with info I want shown (e.g. current song title)
I've got one going and it's working ok so to my question:
I've got Application is agent (UIElement) (so I cannot see a dock icon or menubar)
The code for my little app all resides in the app delegate, now from iOS dev i'm sure this is not the right place for this code, but since the app is a just a status bar item, that has it's title updated I don't think I need a UIViewController etc....
Where should my apps logic go?
Anything online to transition from iOS to OS X?
As you dont have much work with NSWindows and NSViews, you surely dont need NSWindowController or NSViewController.
And I think for this kind of app even your AppDelegate class is enough and best place to put all your logic.
If you have some models then you can break your code upto that, and use it in the AppDelegate itself.
Transition from iOS to OSX.
If you are good in Objective-C then you dont have to worry about few more Cocoa-Controls especially GUI levels, you have full support of Documentation.
Switching between iOS to OSX, vice-versa is not to difficult, but yes if you end up with system level then you need to interact with OSX too.
As stated earlier, if you know Objective-C well, then you should not face major problems. However, there are some differences. I found these following documents helpful:
About Developing for Mac
Migrating from Cocoa Touch

How do you put Game Center Achievements into your iPhone app?

I am very new to Xcode and Objective C. So I need help with the Game Center achievements. I have already set it up on the iTunes connect but don't know how to make them work in my game.
Also, I want to make it so if the user presses a button they get an achievement on Game Center. I have done nothing so far with Gamekit except for import the framework.
Thanks,Kevin
Apple has numerous videos and documentation you can look through to get this done...
https://developer.apple.com/devcenter/ios/gamecenter/
I don't recall the exact API call you will need but you can find it on the Apple developer portal.

Effective ways to "Jazz up" and polish the UI of iOS 5 App

I've finished up my first iOS 5 app (and only third iOS app overall) and I'm wondering if anyone out there has any recommendations for adding that touch of class, polish, professionalism, etc. to a plain-vanilla iOS app. I've taken a look at an iOS 5 appearance tutorial but I don't find it extremely helpful. What do you do to add polish to your UI? For example, do you add a logo view in your UINavigationBar? Do you create custom UIKit control backgrounds/images? Do you remove rounded edges from controls? I would especially appreciate any input related to how you use the new Appearance options in iOS 5 to accomplish your UIX goals.
For inspiration, look at the apps featured by Apple in the App store. Maybe hire an artist or designer familiar with iOS devices and their users (if you are not one yourself). There seem to be lots of creative ways to potentially "delight" the user, customize things for your specific app's purpose or customer base, but still stay within the spirit of the HIG.

Multiple videos on screen using MPMoviePlayerController

What I want to achieve here is a screen with 2 or more different videos on at a time. I know in the apple documentation it says you can't have more than one video playing at a time and thats fine, I don't want to do this.
All I want is to have the 2 videos on screen and when you press on it, it starts to play, you can go fullscreen if you want but as soon as you press on a different video, the old video stops and the new one starts.
I already have three MPMoviePlayerController set up with the correct position, size and video and the 3 boxes are all drawn to the screen but at the moment, only the last one to be drawn to screen can actually be watched.
Does anybody know if there is any way to achieve this or not and if so, how would I go about it?
Thanks,
Matt
As for as I know, you can only have one active movie player at the same time. It's a limitation from MPMoviePlayerController. Message in Apple documentation :
Note: Although you can create multiple MPMoviePlayerController objects
and present their views in your interface, only one movie player at a
time can play its movie.
Source : http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html

Objective-C iPhone - Playing youtube within an app

Is it possible to play youtube using the method described in this url
http://iphoneincubator.com/blog/audio-video/how-to-play-youtube-videos-within-an-application
but with a custom button? (i.e in the picture in the link, it's of a baseball game with the play button overlay on top, I want that to be a custom button that I create)
Thank you,
Tee
No, the way that you play YouTube videos is by opening it in the mobile site, which takes you to the embedded QuickTime/YouTube viewer. It doesn't play them in the view of your app like the QTView would on a Mac.