# Import "ViewController.h"
@ Implementation ViewController
- (Void) moviePlayerDidFinish: (NSNotification *) aNote {
MPMoviePlayerController * player = [aNote object];
[[NSNotificationCenterdefaultCenter] removeObserver: self
name: MPMoviePlayerPlaybackDidFinishNotification
object: player];
[Player stop];
/ / [Self dismissMoviePlayerViewControllerAnimated];
/ / [PlayerViewController release];
}
- (Void) buttonClicked: (id) sender {
NSString * filePath = [[[NSBundlemainBundle] resourcePath] stringByAppendingPathComponent: @ "b.mov"];
NSURL * movieURL = [NSURL fileURLWithPath: filePath];
playerViewController = [[MPMoviePlayerViewControlleralloc] initWithContentURL: movieURL];
[[NSNotificationCenterdefaultCenter] addObserver: self
selector: @ selector (moviePlayerDidFinish :)
name: MPMoviePlayerPlaybackDidFinishNotification
object: nil];
[SelfpresentMoviePlayerViewControllerAnimated: playerViewController];
}
Yeah always being given, the compiler is not passed, how do?
MediaPlayer.framework been introduced, is not through the compiler. Want an afternoon
ld: warning: ignoring file / Users / user / own programs / MoviePlayer / MediaPlayer.framework / MediaPlayer, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_OBJC_CLASS_ $ _MPMoviePlayerViewController", Referenced from:
objc-class-ref in ViewController.o
"_MPMoviePlayerPlaybackDidFinishNotification", Referenced from:
- [ViewController moviePlayerDidFinish:] in ViewController.o
- [ViewController buttonClicked:] in ViewController.o
ld: symbol (s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use-v to see invocation)
MPMoviePlayerPlaybackDidFinishNotification not find the error message seems to be the same, but I really introduces a framework, like framework for the introduction of the menu has changed, or the way I introduced right?
Reply:
Selected CPU architecture is wrong, it should be arm rather than the i386.
i386 is the desktop.
Reply:
How to change? Where change? I chose was a way iphone app
Reply:
This error seems to come across.
Is invoked when a static library out of this mistake.
But in the end did not get directly with the source code.
You look at the. This error is very depressing to say. .
Reply:
The following may help you:
http://www.cnblogs.com/ynwlgh/archive/2011/10/25/2223552.html
No comments:
Post a Comment