In iOS 8, Te file system layout of app containers has changed. Applications and their content are no longer stored in one root directory.
From the iOS 8 Release Notes:
The file system layout of app containers has changed on disk. Rather than relying on hard-coded directory structure, use the
NSSearchPathForDirectoriesInDomains
function or theURLForDirectory:inDomain:appropriateForURL:create:error:
method of theNSFileManager
class. See Accessing Files and Directories in File System Programming Guide.
This is not a bug. Make sure you use the reccomended APIs (from the above quote) and you won't have a problem.
So, If you are trying to access a bundled resource you added to the project, you would use:
[[NSBundle mainBundle] pathForResource:@"resourceName" ofType:@"extension"];
But if you want to use something that you put in the documents directory, you would use:
[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@"resourceName.extension"];
'모바일개발(Mobile Dev) > IOS개발(ObjectC)' 카테고리의 다른 글
Implementing Pull-to-Refresh in xcode (0) | 2015.11.30 |
---|---|
Customizing Navigation Bar (0) | 2015.11.29 |
php prepare stmt json type call (0) | 2015.11.28 |
How To Make an iPhone App Connect to a MySQL Database (0) | 2015.11.27 |
Getting Data From Web Services in JSON Format (0) | 2015.11.27 |