如何在下载后检测点播资源的位置? [英] How to detect where the on demand resources are located after being downloaded?

查看:140
本文介绍了如何在下载后检测点播资源的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过以下两个答案中的参考来实现项目中的应用程序细化: -

I implement the app thinning in my project by getting the reference from below two answers:-


  1. https://stackoverflow.com/a/33145955/988169

  2. https://stackoverflow.com/a/31688592/988169

  1. https://stackoverflow.com/a/33145955/988169
  2. https://stackoverflow.com/a/31688592/988169

如何检测按需资源在下载后的位置?

How to detect where the on demand resources are located after being downloaded?

推荐答案

除非您在初始化资源请求时指定了一个包,否则默认情况下资源将放在主包中。例如,如果适合您的资源类型,您可以通过这种方式访问​​它们:

Unless you specified a bundle when you initialized the resource request, the resources are placed in the main bundle by default. So for example, you could access them this way, if appropriate to your type of resource:

NSString *path= [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"mp4"  ];

这篇关于如何在下载后检测点播资源的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆