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
-1
votes
1 answer

How to Bookmark HTML files in iOS?

I have a bunch of local HTML files and I want to create bookmark functionality in the app. When the user presses the bookmark button, it saves the data in the core data. How to do That?
-1
votes
1 answer

Loading image from folder using NSBundle and plist

Trying to Display the load the image from the folder present on MAC desktop using path like (/Users/sai/Desktop/images/aaa.jpg) Which is created in plist file called Data.plist at item0. As im using NSBundle it is diaplying the image path but not…
lreddy
  • 449
  • 6
  • 19
-1
votes
3 answers

Unable to populate array using plist

I am trying to populate my array using Plist. This is my plist file,Menu.plist. -Item 0, type: dictionary, value(1 item) - Title, string, Contacts -Item 1, type: dictionary, value(1 item) - Title, string, Edit - (void)viewDidLoad { …
Francis F
  • 3,157
  • 3
  • 41
  • 79
-1
votes
2 answers

Objective-C / Load cell from xib / Need explanation

Ok, I know how to load a custom cell from a xib, via this code: NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustpmCellView" owner:self options:nil]; cell = (CustomCell *)[nib objectAtIndex:0]; But can someone explain what does the first…
Lord Zsolt
  • 6,492
  • 9
  • 46
  • 76
-1
votes
3 answers

How to hardcode a text file into iOS app

Currently using: NSString* path = [[NSBundle mainBundle] pathForResource:@"filename" ofType:@"txt"]; This only works however after I manually add the file into the application bundle. I can use the…
stackOverFlew
  • 1,479
  • 2
  • 31
  • 58
-1
votes
2 answers

iphone Simulator and device bundle

i am prepararing an ios application. i am using following code NSString * yol=[[NSBundle mainBundle]pathForResource:@"TavsiyeKitapAile" ofType:@"plist"]; NSDictionary * tka = [XMLReader dictionaryForXMLData:[NSData dataWithContentsOfURL:[NSURL…
-1
votes
2 answers

Download Data from SQL Database for use in iPhone App

Can someone point me to a tutorial or some resource that will show me how I can download or use a sql database from a web server and use that content in an app. I want to control content in an app dynamically, such that each time the app is…
Matt
  • 2,920
  • 6
  • 23
  • 33
-2
votes
1 answer

NSBundle.mainBundle().pathForResource() why not enter in section of if?

NSBundle.mainBundle().pathForResource() why not enter in section of if?
Isa M
  • 159
  • 1
  • 10
-2
votes
1 answer

Bad instruction NSDATA with gif file Swift

Here is the error. As you can see my image is in the top right corner. All my code is there, I'm not sure what else to show. \ I have been following the tutorial here Apologies, I'm not sure how to resize the image Error: fatal error: unexpectedly…
Greg Peckory
  • 7,700
  • 21
  • 67
  • 114
-2
votes
1 answer

contentsOfDirectoryAtPath returning nil

I have a folder with a bunch of images named “Pictures” right inside “Supporting Files”, but when I try to retrieve the files it returns nil, even though I'm sure there are images inside; I try to do it with the following code inside…
-4
votes
1 answer

fatal error: unexpectedly found nil while unwrapping an Optional value

I'm trying out some basic stuff like playing audio. Right in the beginning when I ran the project I got an error, the error doesn't show up in the view controller but it pops up right away when I run the project. fatal error: unexpectedly found…
-6
votes
1 answer

What does this objective C syntax mean?

I'm new to objective-C. Can someone explain what does this code mean? title = NSLocalizedStringWithDefaultValue(@"DFUSuccessAlertTitle", @"DFU", …
user3240815
  • 21
  • 1
  • 5
-12
votes
5 answers

Generating a list of Strings in Obj C

It seems that Objective C jumps thru hoops to make seemingly simple tasks extremely difficult. I simply need to create a sequence of strings, image1.jpg, image2.jpg, etc etc ie in a loop var imgString:String='image'+i+'.jpg; I assume a best practice…
Bachalo
  • 6,965
  • 27
  • 95
  • 189
1 2 3
37
38