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

前端 未结 3 345
旧巷少年郎
旧巷少年郎 2021-01-21 05:38

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://stackover
3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-21 06:14

    To expand upon saswanb's answer, the pathForResource you use has to match the folder or filename you added to the ODR tag. If you add a reference to a folder to an ODR, you can search for that folder name, but not the contents of the folder.

    NSString *path= [[NSBundle mainBundle] pathForResource:@"ODRFolder1" ofType:nil  ];
    

    But if you add the contents of the folder to the ODR tag, then you can search for each file individually.

提交回复
热议问题