Top "Nsbundle" questions

An NSBundle object represents a location in the file system that groups code and resources that can be used in a program.

Write a file on iOS

How do I write a file on iOS? I'm trying to do it with the following code but I'm doing …

ios iphone file nsbundle
accessing a file using [NSBundle mainBundle] pathForResource: ofType:inDirectory:

I have a file paylines.txt added inside the folder named TextFiles which resides inside the Resources folder of my …

objective-c ios xcode filepath nsbundle
How to get bundle ID?

I am working on getting the facebook API working for iOS, and the FB registration page requires the Bundle ID …

ios nsbundle
Get file path and URL for file in temp directory

I'm trying to get the file path of a file called "temp.pdf" which is located in the NSTemporaryDirectory folder (…

objective-c ios cocoa nsbundle
Why can't code inside unit tests find bundle resources?

Some code I am unit testing needs to load a resource file. It contains the following line: NSString *path = [[NSBundle …

cocoa unit-testing xcode nsbundle octest
NSBundle.mainBundle().pathForResource returns nil

I am trying to write a simple IO wrapper for Swift. To test this I have a file named "Test.…

ios objective-c swift nsbundle
Getting bundle file references / paths at app launch

Suppose I have an arbitrary set of files included in the Main App Bundle. I would like to fetch the …

ios ios5 nsfilemanager nsbundle
Working with paths from [[NSBundle mainBundle] resourcePath]

I'm sure it's a very basic problem, but I'm having trouble finding anything about it. Say I've got my app …

objective-c directory path nsbundle
NSBundle pathForResource is NULL

I'm creating a simple application with xcode and objc and I need to load an NSDictionary from a file, but …

objective-c xcode nsbundle
Access Asset Catalog pathForResource

It appears that: [[NSBundle mainBundle] pathForResource:@"name" ofType:@"png"]; Does not return anything for assets that are inside the Images.…

ios7 xcode5 nsbundle