iOS 8 Folder Structure

The iOS 8 Release Notes state

The file system layout of app containers has changed on disk. Rather than relying on hard-coded directory structure, use the NSSearchPathForDirectoriesInDomains function or the URLForDirectory:inDomain:appropriateForURL:create:error: method of the NSFileManager class. See Accessing Files and Directories in File System Programming Guide.

This includes the path for [NSBundle mainBundle], which now looks something like

/private/var/mobile/Containers/Bundle/Application/4CACB504-652B-44AF-8DBE-7AD40578507E/example.app/

In addition, that UUID part of the path will change when updating the app or installing new builds during development. This means that relying on hard-coded directory structures from legacy code will break not only once, but twice and hard.

For accessing bundled resources from a web view, I think this means that you have to through loading data with – loadData:MIMEType:textEncodingName:baseURL: and supply the mainBundle as the baseURL, instead of just using a request object with the document URL on disk.