小编fre*_*ler的帖子

MPMoviePlayerController的initialPlaybackTime属性在iOS 8.4中不起作用

设置initialPlaybackTime属性后,视频(HTTP流)仍然从头开始播放.

相同的代码在iOS <= 8.3中运行良好:

 self.moviePlayer.initialPlaybackTime = self.lastPlaybackTime;
[self.moviePlayer play];
Run Code Online (Sandbox Code Playgroud)

objective-c mpmovieplayercontroller ios ios9 ios8.4

15
推荐指数
1
解决办法
2551
查看次数

当飞行模式开启时,无法在iOS 7中播放本地视频流

我启动了一个本地http服务器来提供视频流:

http://localhost:55736/videos/foo.m3u8
Run Code Online (Sandbox Code Playgroud)

并用MPMoviePlayerController它来玩.无论飞行模式是否开启,它在iOS6中都能很好地工作.

但是在iOS 7中,当飞行模式开启(或关闭WIFI和蜂窝数据网络)时,我得到了错误:

_itemFailedToPlayToEnd: {
kind = 1;
new = 2;
old = 0;
Run Code Online (Sandbox Code Playgroud)

}

MPMoviePlayerPlaybackDidFinishNotification处理程序:

NSConcreteNotification 0x146c35c0 {
  name = MPMoviePlayerPlaybackDidFinishNotification; 
  object = <MPMoviePlayerController: 0x14682b90>;
  userInfo = {
    MPMoviePlayerPlaybackDidFinishReasonUserInfoKey = 1;
    error = "Error Domain=MediaPlayerErrorDomain Code=-11800....
  }
}
Run Code Online (Sandbox Code Playgroud)

objective-c ios ios7

14
推荐指数
1
解决办法
1660
查看次数

是否可以让chroot jails在监狱外共享目录(只读)?

我有多个chroot jails,我希望他们共享一些目录,目前我必须将这些目录复制到我觉得不优雅的jails中.目录是只读的,如'/ usr/bin'.

linux virtualization debian chroot

9
推荐指数
1
解决办法
3239
查看次数

如何在不编辑iOS中的/ etc/hosts的情况下使用直接ip访问HTTPS?

默认情况下,example.com解析为123.123.123.123,

但如果我希望它得到解决100.100.100.100.

对于http,我只需将URL更改http://100.100.100.100为标题为"Host:example.com".

但它不适用于HTTPS.(错误:SSL证书问题:证书链无效).

我的问题不是原因,我不想跳过证书验证.

如何在Objective-C中获得与curl相同的效果

--resolve 选项:

--resolve <host:port:address>
          Provide a custom address for a specific host and port pair. Using this, you can make the  curl  requests(s)
          use  a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort
          of /etc/hosts alternative provided on the command line. The port number should be the number used  for  the
          specific  protocol  the  host  will …
Run Code Online (Sandbox Code Playgroud)

dns objective-c ios afnetworking

6
推荐指数
1
解决办法
1271
查看次数

如何修复'NSObjectInaccessibleException'获取请求在NSManagedObjectContext使用之前无法响应-entity

代码在iOS5 +中运行良好:

NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"FooBar"];
request.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"ident"
                                                                                 ascending:NO
                                                                                  selector:@selector(compare:)]];
request.predicate = [NSPredicate predicateWithFormat:@"xxx = %@", @"yyy"];

self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request
                                                                    managedObjectContext:model.managedObjectContext
                                                                      sectionNameKeyPath:nil
                                                                               cacheName:nil];
Run Code Online (Sandbox Code Playgroud)

但在iOS 4中,我收到以下错误:

'NSObjectInaccessibleException', reason: 'This fetch request (0x70d4700) 
was created with a string name (FooBar), and cannot respond to -entity 
until used by an NSManagedObjectContext'

2012-11-08 12:12:18.093 hello[1566:11d03] *** Terminating app due to uncaught
exception 'NSObjectInaccessibleException', reason: 'This fetch request 
(0x70d4700) was created with a string name (FooBar), and cannot respond …
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch core-data objective-c ios

0
推荐指数
1
解决办法
478
查看次数