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

Objective C Accessing NSBundle

I have a few questions and some problems: What I want to do: Rename a File in MyApp.app/Assets/Debug/debug.xml to MyApp.app/Assets/Debug/debug_2.xml 1. NSString *filePath = [[NSBundle mainBundle] pathForResource:@"debug" ofType:"xml"…
Janosch Hübner
  • 1,584
  • 25
  • 44
0
votes
1 answer

How to use local resources to speed up webview in iOS?

I'm loading a remote webpage into an iOS webview which relies on js and css assets. To improve the performance particularly on 3G networks, I'm hoping to call these assets from files local to the iOS device. The website backing the iOS app is also…
Khan
  • 423
  • 4
  • 9
0
votes
1 answer

malloc:mmap(size=XX) failed (error code=12)

I have a memory problem in an iPhone app, giving me a hard time. Here is the error message I get: malloc: * mmap(size=9281536) failed (error code=12) * error: can't allocate region I am using ARC for this app, in case that might be useful…
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
2 answers

Mac app crashes on launch, linked framework not bundled

(Edit: I was able to bundle the framework but it still would not take the changed installation directory. So, below, the question has changed to "linked and bundled framework image not found") The Mac app was submitted to MAS but rejected by Apple,…
Henrik Erlandsson
  • 3,797
  • 5
  • 43
  • 63
0
votes
1 answer

How to disable (or be notified of) the deletion of a loaded plugin (NSBundle) file?

I wrote an app with a plugin system (with NSBundle), all is ok but i want to handle the case of when a plugin file is deleted during the app execution. I think the best way to do that is to disable the deletion of a loaded plugin file (like dll in…
Johnmph
  • 3,391
  • 24
  • 32
0
votes
1 answer

iOS - check if image is present in app bundle

How can I tell if an image is present in the main app bundle based on a string? For example, is there an image called image1.png in the bundle?
soleil
  • 12,133
  • 33
  • 112
  • 183
0
votes
2 answers

Why is this not finding the correct pathForResource for these images?

I have images "hit_circle_0.png" through "hit_circle_19.png" in my resources folder but for some reason this code never passes the test for "found" The annoying thing is that I have the exact same function working in another method just below it.…
frankie
  • 661
  • 2
  • 10
  • 25
0
votes
1 answer

Localization 3rd party frameworks, UIView etc

How to make localization for 3rd party frameworks, specially for custom UIView's. To make localization for a project is pretty simple, you just need to add Localization.strings, but how to make localization for custom UIView in separate file. And…
rowwingman
  • 5,589
  • 7
  • 33
  • 50
0
votes
1 answer

Attempting to find bundle for my custom Quartz Composer plugin

I am writing my own Quartz Composer plugin and I would like to load GLSL shaders, textures, etc. from my QC plugin's bundle. The problem is that it appears that I am getting my loading application's (the QC runtime app) bundle instead. I tried…
Joel
  • 352
  • 1
  • 3
  • 11
0
votes
3 answers

Check file exists in a folder inside Directory in iPhone

I am new to iPhone, I want to check whether Myfile exists in folder inside DocumentDirectory ? For eg: Myfile.epub is one of my file and i want to check whether this file exists at my DestPath or not ? DestPath is my DocumentDirectory…
Krunal
  • 6,440
  • 21
  • 91
  • 155
0
votes
1 answer

Figuring out the NSBundle used for a UIViewController

When UIViewControllers are instantiated using - (id)initWithNibName:bundle:, you can pass in a bundle. Is there a way to for the instantiated view controller to find out what its original bundle was? I have a container UIViewController and I would…
Howard Spear
  • 551
  • 1
  • 5
  • 14
0
votes
1 answer

MPMoviePlayer doesn't work in app

I am trying to create an app with my video to play in a view with a UIButton. FYI: I am using a storyboard with a tab bar view controller, so this code MPMoviePlayerView is inside another view. I keep getting this error: * Terminating app due to…
0
votes
1 answer

NSBundle creates files for given path

When I use NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"sqlite"]; The NSBundle class, instead of returning nil, for a given file name when the file is not included in Xcode, seems to be creating the file no matter what. I…
foFox
  • 205
  • 2
  • 5
  • 12
0
votes
3 answers

what the difference between sandbox and bundle in iOS

i know sandbox and bundle in iOS app,but what the difference? the bundle is included in the sandbox? And hao can i get the document directory by the bundle?
0
votes
1 answer

Objective-C, NSArray from executableArchitectures

I'm trying to determine the architecture of another file from my application. I'm using my application bundle and comparing it to a different bundle in my example. The methods are in place and they do return values to NSLog, although they are not…
Joe Habadas
  • 628
  • 8
  • 21