You are currently viewing the BOOK: Professional iPhone and iPad Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I am at Chapter 8, page 299 and 300 and notice two large blocks of code that are different in my Xcode file than the example in the book.
In your book on page 299, you show a couple code modifications for the file "iPadLibraryMoviePlayerAppDelegate.m" and you have listed the instance methods (if I have that naming correctly..still learning)
but that does not exist in my code that was generated by my Xcode version 3.2.5 --Simulator - 4.2
so I do not know where to put your code in bold.
I am very interested in the video playing ability on the iPad and need to grab time codes so I was hoping that your book will help but now I am rather stuck to finish this exercise.
Thank you so much!!
These methods - which are delegate methods, not instance methods - are generated in the AppDelegate template, in this case, in iPodLibraryMoviePlayerAppDelegate.m To test this fact simply create a new View-based Application and look at the template for the AppDelegate. (Simply doing step 1 on p. 292 will demonstrate this.) If they are missing than something has gone wrong, since you should have not made any edits to this file up to this point. Are the other delegate methods present? (Running Xcode version 3.2.5)
No you are not doing anything wrong at all. Good catch !!!
It should read "create a View-based application for the iPhone"...
The template for the iPhone and iPad are different, and as you found out, does not automatically supply these delegate methods.
ALSO..... when this book was published 4.0 and then soon after 4.1 was released. I have been keeping up with the SDK's so you, the reader, will not have to deal with the Base SDK Missing error when upgrading versions.
In 4.2, Apple no longer allows searching the iPod Library for Video content. So the traditional way I illustrate here will no longer work. I will be updating the project and will post an updated project ASAP. Gotta love change
The purpose of the chapter is to illustrate playing a movie, so the subject matter will remain the same, but the source of the video will no longer be the library, rather another source.
Thank you Gene..
i did try the IPhone "view-based" and it did work like the book code shows.
I bought the book solely for the video section. You can imagine I am eagerly waiting for the update code sample. I have been through four books and the Apple docs and can see that there is some confusion as to how to work with the AVfoundation and MediaPlayer frameworks and using both to get the frame info I need. It was a lot easier in QTKit on MAC OS.
I like the fact that you have both frameworks illustrated in one app and can compare the player controls that are provided by them and your use of a table to pull in a selection of videos to choose from. Nice!..
I have used the MediaPlayer to make a smaller view to play the video in the ipad but what is not covered in any book is how to go deeper into the information in the frame, like to grab time codes. I see examples in books that use either one or the other of the frameworks but don't see if once you've used one framework to get your video playing and paused, like the MediaPlayer, can you use a different framework to get the timecode somehow. I don't know if the MPMovieTimeOptionExact will be the correct choice to grab and set the player head.
So I look forward to your examples of using some videos on the iPad to compare these frameworks!
Thank you for your speedy support!
Just a note, there is no audio with these sample movies, as I wanted to put together something quick to keep you going with this chapter, but they are me showing you how to actually create this application from scratch. So a sneak preview of maybe a future podcast ????
The Following User Says Thank You to gbacklin For This Useful Post:
You are amazing!! Can't wait to load the code...
i can't thank you enough. How many times can I click that "thanks" button?!!
I will be watching all of your podcasts as soon as you do them. Let us know for sure when that happens and any other books and book signings "out West" !!