0

I have been searching since a week for that is there any library like MPMediaPickerController which can be used for IPhone (as MPMediaPickerController works only for IPad). Kindly guide me that MPMediaPickerController works with Iphone too or not ? And if not then what is the alternative provided by apple for IPhone?

Wasim
  • 1,349
  • 12
  • 16
  • Where did you get the idea that `MPMediaPickerController` only works on iPad? – omz Jul 14 '11 at 10:29
  • I read on some forums, didnt remember their link right now, but i tried myself on xcode and I saw that when I select the project type for IPad, `MPMediaPickerController` works fine but whenever i select Iphone it doesn't. Is it because of SDK difference? – Wasim Jul 14 '11 at 10:32
  • I've never used it, but it should definitely work on iPhone. The class has been available since iPhone OS 3.0 (3.2 is the first version to support the iPad). – omz Jul 14 '11 at 10:37
  • I have the same thought but I think that I am facing this because of difference of SDKs. If I go with 3.2 SDKm then may be i would be able to use it on IPhone too, but unfortunately my app is on 4.1 SDK and I cant reverse it to 3.2, any recommendation? – Wasim Jul 14 '11 at 10:40
  • I would hazard a guess that it's something in your code that's not functioning correctly as I can categorically state that `MPMediaPickerController` works fine on the iPhone in every SDK version from 3.0 upwards. –  Jul 14 '11 at 10:47
  • Its amazing then :s can you tell me that which project type is recommended to use with `MPMediaPickerController` ?? I used windows based project type and MPMediaPickerController` not worked in that. – Wasim Jul 14 '11 at 10:50
  • The project type doesn't matter, but you have to include the MediaPlayer framework. – omz Jul 14 '11 at 10:54
  • I did include but still no effect. Even when I write `MPMediaPickerController *picker =` `[[MPMediaPickerController alloc] initWithMediaTypes:` `MPMediaTypeMusic];` its not autocompleting them and also not changing their colors :( – Wasim Jul 14 '11 at 10:59

1 Answers1

1

You can see the apple's sample code. This is the link http://developer.apple.com/library/ios/#samplecode/AddMusic/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40008845 In that code they are using MPMediaPickerController only. It is working properly on iPhone. You had made some minor mistake in your code

Raxit
  • 824
  • 7
  • 12
  • Thanks for the link. I already downloaded and ran it on simulator. If you see on Active Executables, it contains only Ipad 3.0 and that is the reason I was wondering that if it can work on Iphone or not. – Wasim Jul 14 '11 at 11:07
  • It's just default setting done by Apple. I executed the same code on iPhone simulator 3.0 to 4.3. It is working perfectly well. – Raxit Jul 14 '11 at 11:14
  • ok sir I will see it again and will get back to you shortly. Thanks a lot for your guidance. – Wasim Jul 14 '11 at 11:23