문제

I would like to open QuickTime and play a remote file.

I use the following code:

NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/usr/bin/open"];
[task setArguments:[NSArray arrayWithObjects: @"/Applications/QuickTime Player.app", @"http://...", nil]];
[task launch];

But the console says:

Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all

What's wrong? I also mod the third line:

[task setArguments:[NSArray arrayWithObjects: @"-a", @"/Applications/QuickTime Player.app", @"http://...", nil]];

I only found an answer for non native code: How can I start QuickTime and have it start playing a url?

Thanks very much for some hints or samples!

도움이 되었습니까?

해결책

Problem solved: Using ASBQuickTimeApplication.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top