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
3 answers

Can't Copy a directory from Bundle to Library

i have a bit frustated problem here, The problem is I want to copy a directory from Bundle into Library path in my app, but the code can't do that. The tree of the directory is showing here : before I copy the directory, i wanna check the…
R. Dewi
  • 4,141
  • 9
  • 41
  • 66
0
votes
1 answer

Loading .a (static library) file using NSBundle?

How to load .a file in objective-c programmatically. And how to get type of the class?
user3200854
  • 147
  • 2
  • 8
0
votes
1 answer

Warning: NSBundle NSBundle (not yet loaded) was released too many times in iOS simulator

I'm getting this error when I try to test my app. If I completely close the simulator and re-launch, I can get past it temporarily, but it always comes back after one or two launches. Does anyone know what this is or how to fix it? Warning:…
AndroidDev
  • 20,466
  • 42
  • 148
  • 239
0
votes
3 answers

iOS Change app Language doesn't take effect

I am changing my iOS application preferred language dynamically using this setting: [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@"ar"] forKey:@"AppleLanguages"]; Then I load a localised resource file from the main…
Ahmed Said
  • 1,285
  • 5
  • 16
  • 28
0
votes
1 answer

NSDocument class file bundle not copy right

I created an NSDocument base app, which provides a custom file format, which is a bundle containing multiple resources... all works fine, i can save, load, show package contents etc... the problem is, when i want to sent it over internet, like with…
Peter Lapisu
  • 19,915
  • 16
  • 123
  • 179
0
votes
1 answer

iOS app giving low memory warnings with 350MB size

I have developed one iPad application targeting for iOS6 and using ARC. Application size is 350 MB due to many images, audio & video files in the bundle. As this app will work locally I am storing the content in application' main bundle. How to…
Srivathsa
  • 606
  • 10
  • 34
0
votes
1 answer

Getting NSURL to file in subdirectory

I'm integrating a third-party SDK for voice messaging. It saves audio files to Documents/audio/. I've peeked into the bundle on my test device using iFunBox and found the files are named like this: "b3abwx78...wav". There is no file extension, the…
Reid
  • 1,109
  • 1
  • 12
  • 27
0
votes
1 answer

iOS - mp3 file not playing, no error?

I'm attempting to use the below code to play an mp3 file. It seems to run fine but no sound comes from the phone. The volume is up, the file is found (if I change the requested file to a name that doesn't exist I get an error), and no errors show up…
golmschenk
  • 11,736
  • 20
  • 78
  • 137
0
votes
3 answers

Unable to access a file from code with Xcode - ios

IOS development... I have a json data file named "Data.js" in the same directory where the code file is and is trying access it with the following code... NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Data" odType:@"js"]; but this…
0
votes
3 answers

How to access files at a path NSURL

Hello everyone i have the following code : NSString* issuePath =[[self contentURL] URLByAppendingPathComponent:@"magazine"].path; I have a file called a.plist in the above directory. I have to read the a.plist file contents. How to do that.…
veereev
  • 2,650
  • 4
  • 27
  • 40
0
votes
1 answer

In Cocoa for OS X, What is "bundle" and what does it do?

I have known many resource are initialized with "bundle". And I know "bundle" is resource-related. But in general, I do not quite understand what bundle is, what it does, and what could we take it for. Could any one answer this question for me?
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
0
votes
2 answers

Fore xcode to load bundle

The core data models are in a bundle which is added to main project. now i have to migrate core data to newer model. i have been following some example like this so i want to migrate database before any queries or import happen. so i placed the code…
Hashmat Khalil
  • 1,826
  • 1
  • 25
  • 49
0
votes
2 answers

- [NSBundle pathForResource:ofType] works differently for directories on 10.7 and 10.8

I had this code NSString *path = @"foo/bar"; // Note this is a directory, not a file! NSString *pathInBundle = [[NSBundle mainBundle] pathForResource:path ofType:nil]; It was working fine on 10.8 (returning the path found in the bundle) but…
StuFF mc
  • 4,137
  • 2
  • 33
  • 32
0
votes
1 answer

iOS loading executable from a bundle

According to the documentation for [NSBundle load] method : Dynamically loads the bundle’s executable code into a running program, if the code has not already been loaded. I have tried this in an iOS project and it works perfectly, my question is if…
cansener
  • 63
  • 2
  • 6
0
votes
1 answer

iOS: NSBundle object becomes invalid after folder removed and recreated

I am using following to initialise bundle object in viewDidLoad. documentBundle = [[NSBundle alloc] initWithPath:path]; Where path looks like following; /Users/..../Library/Application Support/iPhone…
Paresh Masani
  • 7,474
  • 12
  • 73
  • 139