josplayer在ios中未被捕获的异常

时间:2016-12-21 10:12:54

标签: ios objective-c xcode jwplayer

我正在尝试在ios应用程序中实现jwplayer但使用非常简单的启动它会不断抛出信号中止错误

@interface ViewController () <JWPlayerDelegate>

@property JWPlayerController *player;

@end

@implementation ViewController

 - (void)viewDidLoad
   {
[super viewDidLoad];
[self createPlayer];


}

- (void)createPlayer
{

JWConfig *config = [JWConfig configWithContentURL:@"http://content.bitsontherun.com/videos/3XnJSIm4-injeKYZS.mp4"];
config.autostart = YES;
self.player = [[JWPlayerController alloc] initWithConfig:config];

config.size = CGSizeMake(100, 100);
_player.view.frame = CGRectMake(0, 0, 100, 100);
[self.view addSubview:self.view];
}
@end

错误:

  

jwplayercheck [4111:850586] - [JWConfig xmlPlayList]:无法识别的选择器发送到实例0x1701256e0   2016-12-21 15:14:31.827747 jwplayercheck [4111:850586] *由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' - [JWConfig xmlPlayList]:无法识别的选择器发送到实例0x1701256e0'   * 第一次抛出调用堆栈:   (0x1820321c0 0x180a6c55c 0x182039278 0x182036278 0x181f3059c 0x1000e38bc 0x1000be750 0x1000b4f68 0x1000b4a00 0x1000d9770 0x1000d97e0 0x1000ab850 0x1000ab7c4 0x187e860b0 0x187e85c78 0x187e8c424 0x187e898c4 0x187efc0e8 0x188108a78 0x18810e5c8 0x188122e60 0x18810b5ac 0x183bd98bc 0x183bd9728 0x183bd9ad0 0x181fe0278 0x181fdfbc0 0x181fdd7c0 0x181f0c048 0x187ef12b0 0x187eec034 0x1000ac414 0x180ef05b8)   libc ++ abi.dylib:以NSException类型的未捕获异常终止   (lldb)

1 个答案:

答案 0 :(得分:2)

[将构建设置中的其他链接器标志更改为&#34; -all_load&#34;]