Questions tagged [nsbundle]

An NSBundle object represents a location in the file system that groups code and resources that can be used in a program. NSBundle objects locate program resources, dynamically load and unload executable code, and assist in localization. You build a bundle in Xcode using one of these project types: Application, Framework, plug-ins.

An NSBundle object represents a location in the file system that groups code and resources that can be used in a program. NSBundle objects locate program resources, dynamically load and unload executable code, and assist in localization. You build a bundle in Xcode using one of these project types: Application, Framework, plug-ins.

568 questions
0
votes
1 answer

NSBundle returning every system framework

On Mountain Lion, using Xcode 4.6.2, the following code for (NSBundle *aBundle in [NSBundle allFrameworks]) NSLog(@"%@", [aBundle bundlePath]); logs EVERYTHING, I mean every framework installed in the system (so not just the app's ones, as stated…
user732274
  • 1,069
  • 1
  • 12
  • 28
0
votes
4 answers

Not able to retrieve info.plist data by -pathForResource method?

In my application I am not able to get the plist using the below code. I am using Xcode 4.5 and here is my code for retrieving plist, NSBundle *thisBundle = [NSBundle mainBundle]; NSDictionary *theDictionary; NSString…
vignesh kumar
  • 2,310
  • 2
  • 25
  • 39
0
votes
2 answers

Cocoa - problem with this code using NSBundle

It was suggested that I use this line of code to call an image from my resources folder/project bundle. I also see it being used exactly like this on many different website tutorials. NSBundle *mb=[NSBundle mainBundle]; NSString *fp=[mb…
Brian
  • 63
  • 6
0
votes
1 answer

how to check file in Document dir and copy from NSBundle

I want create one application that read file from document dir but first I want check document dir if not exist file in self copy this file (Db.sqlite) from NSBundle Main to document dir and read it. I could read data from document dir or check…
david
  • 147
  • 3
  • 12
0
votes
1 answer

Best practices for a widget API in Objective-C

I am currently making an app that allows third-party developers to create widgets for it using the API. Right now, I ship a library with the application containing a class that developers must create a subclass of. They must package their program in…
David Murray
  • 541
  • 5
  • 19
0
votes
1 answer

Mac OS X app bundle for shell script doesn't works

I just did a app bundle like it's shown on this blog, but the app is not working. It looks like it will open (the OS X effect of the app opening) but then nothing happens, no window, no process, nothing. Running the script as ./app.sh on app…
Alejandro García Iglesias
  • 16,222
  • 11
  • 51
  • 64
0
votes
1 answer

iOS - Check Previous Bundle Version

Is it possible to programmatically check the bundle version of the previous app version installed? I know how to get the current version [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; The reason I ask is because there is…
Kevin_TA
  • 4,575
  • 13
  • 48
  • 77
0
votes
2 answers

NSURL is always nil dispite encoding

I'm generating a PDF file and am attempting to preview it as shown below, but URL routinely returns NIL despite my formatting (which is what seems to resolve everyone else's issue with this common problem). I must be missing something more. Any…
Jesse Meyer
  • 315
  • 1
  • 3
  • 12
0
votes
1 answer

How to add a directory structure with duplicate filenames to a project?

I have a directory that boils down to this: / - character0 -- attribute0 -- image.png - character1 -- attribute0 -- image.png I dropped it in XCode, in order to define two characters. Now I would like to load each image.png CIImage * cheetah =…
alecail
  • 3,993
  • 4
  • 33
  • 52
0
votes
1 answer

NSBundle while unit testing with OCUnit returns (null)

Problem : Retrieving from NSBundle returns (null) while running Unit Test, returns valid object on run time. What have I done ? I have searched SO with similar problems, apple's developer and other online resources for this problem but with no…
Kishor Kundan
  • 3,135
  • 1
  • 23
  • 30
0
votes
1 answer

NSBundle not able to access static library java script file path

In my project I am including a static compiled library, which has a javascript resource in it. Now in my App at a particular event I want to run that javascript file from my library. But when I try to access the js file the path is null. I tried…
user655192
  • 1,011
  • 2
  • 8
  • 5
0
votes
1 answer

access an UIImage instance variable and display it in UIImageView

I'm trying to access an UIImage instance variable and display it in UIImageView. When I try to NSLog the path I get null. I can manually display a pic through the IB, but I want to do this strictly through code #import "Deck.h" #import…
blitzeus
  • 485
  • 2
  • 10
  • 28
0
votes
1 answer

NSBundle File References Lost After App Reinstalled

I save a user preference for an audio file in NSUserDefaults with a URL built like this: soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/audioFile1.m4r", [[NSBundle mainBundle] resourcePath]]]; That preference is subsequently…
Michael Mangold
  • 1,741
  • 3
  • 18
  • 32
0
votes
2 answers

not able to save data to file on iPhone

I created a method that first save the json data to the file and then I am reading the data from the file. I am able to save and read data when I run on simulator but when I try to run the application on iPhone and debug thru, it does not save or…
kdnerd
  • 341
  • 3
  • 10
0
votes
2 answers

Loading a nib file

I am trying to load a nib file like this: [[NSBundle mainBundle] loadNibNamed:@"PhotoViewController" owner:self options:nil]; but it makes the app crash
Alessandro
  • 4,000
  • 12
  • 63
  • 131