Reputation: 7
When I follow this tutorial: http://www.youtube.com/watch?v=cYXAHRvHbQE It gives me an error on the [playercontroller release]; line, so I remove it, and then it gives me these errors when I try to run it
Here is the image: (it wont let me post it) http://aftermathgame.webs.com/ss1.png
Upvotes: 0
Views: 239
Reputation: 9600
If you simply must not add the header files only.
First, a framework must be added to your project.
Second, you should a following header. #import <MediaPlayer/MediaPlayer.h>
refer a following process.
In Xcode, click your project file at the top of the Project Navigator.
Click 'YourProjectName' under "Targets"
Click the "Build Phases" tab.
Click the plus in the "Link Binary With Libraries" window.
Add the MediaPlayer.Framework library
Add
#import <MediaPlayer/MediaPlyer.h>
Upvotes: 4
Reputation: 7386
I'd guess this bit:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:
objc-class-ref in ViewController.o
... means you failed to link against the MediaPlayer framework.
Click on your project file in the navigator find the Linked Frameworks panel and add the the missing framework.
The semantic error you're also getting means you didn't declare your view controller as conforming to the AVAudioPlayerDelegate protocol. (Add this in angle brackets <AVAudioPlayerDelegate>
after the class declaration.)
Upvotes: 1