Questions tagged [plist]

A plist file, also known as a "Property List" file, stores serialized objects such as arrays, dictionaries, and strings.

Property list files store serialized objects and are used by OS X, iOS, NeXTSTEP and some programming frameworks. They are usually used to store user preferences, bundles and application settings.

3387 questions
306
votes
12 answers

How to localise a string inside the iOS info.plist file?

As you might know the iOS 8 requires NSLocationWhenInUseUsageDescription key for using user's location. I have added this key and some general information into my info plist. How can I use translation string inside the plist file ? -- Update -- I…
Soheil
  • 4,417
  • 3
  • 19
  • 41
167
votes
12 answers

NSCameraUsageDescription in iOS 10.0 runtime crash?

Using iOS 10.0 last beta. I had tried to use Camera to scan barcode in my app, and it crashed with this runtime error. This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist…
user3069232
  • 7,063
  • 6
  • 36
  • 61
117
votes
8 answers

best way to add license section to iOS settings bundle

My iOS application uses a number of third party components licensed under Apache 2.0 and similar licenses, which requires me to include various bits of text, this kind of thing: * Redistributions in binary form must reproduce the above copyright …
JosephH
  • 36,107
  • 19
  • 126
  • 149
113
votes
3 answers

Where are ${EXECUTABLE_NAME} and ${PRODUCT_NAME} defined

Where can I find information on how to modify these ${EXECUTABLE_NAME} ${PRODUCT_NAME} These are only displayed in .plist file but where are the actual values. If we can directly modify what ever we want in .plist why we need these. I am new…
Hazel Sophie
  • 1,265
  • 2
  • 9
  • 8
111
votes
30 answers

CFBundleVersion in the Info.plist Upload Error

"The binary you uploaded was invalid. The key CFBundleVersion in the Info.plist file must contain a higher version than that of the previously uploaded version." I’m getting this error when I come to upload my application. I set the updated…
Adam H
  • 1,521
  • 2
  • 16
  • 19
107
votes
3 answers

iOS 10 - Changes in asking permissions of Camera, microphone and Photo Library causing application to crash

iOS 10, Now Requires User Permission to Access Media Library, Photos, Camera and other Hardware like these. The solution for this is to add their keys into info.plist with a description for user that how we are using their data, I could only find a…
Syed Ali Salman
  • 2,825
  • 4
  • 31
  • 45
75
votes
5 answers

Where is a Mac Application's NSUserDefaults Data Stored?

I am using NSUserDefaults to store some data in my application. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setObject:@"dummy string" forKey:@"lastValue"]; [prefs synchronize]; For testing purposes I need to see the System…
ahmadbaig
  • 996
  • 1
  • 7
  • 9
70
votes
7 answers

Command-line tool for converting PLIST to JSON?

Is there a command line tool available for converting .plist files to JSON? If not, what would be the approach for creating one using Objective-C or C on a Mac? For instance, there is JSONKit, for Objective-C. How would one go about opening a .plist…
dandean
  • 1,301
  • 1
  • 11
  • 7
67
votes
2 answers

How do I comment lines in .plist file?

How do I comment out lines in my .plist file in my iOS/Mac projects? I want to comment out the settings that I don't want to expose for this version of the project, but I may want to expose it later.
Enrico Susatyo
  • 18,061
  • 17
  • 89
  • 153
63
votes
2 answers

Error while executing .plist file Path had bad ownership/permissions

Getting a error while executing the plist file in terminal ERROR : Path had bad ownership/permissions 1) I created a plist file using xcode 6 and saved the plist file in path library/launchdaemons/myfile.plist myfile.plist
vivek
  • 767
  • 1
  • 7
  • 9
50
votes
9 answers

Should I use NSUserDefaults or a plist to store data?

I will be storing a few strings (maybe 10-20). I am not sure if I should use NSUserDefaults to save them, or write them out to a plist. What is considered best practice? NSUserDefaults seems like it is less lines of code, therefore quicker to…
Sheehan Alam
  • 57,155
  • 123
  • 348
  • 546
50
votes
5 answers

NSString: newline escape in plist

I'm writing a property list to be in the resources bundle of my application. An NSString object in the plist needs to have line-breaks in it. I tried \n, but that doesn't work. What do I do to have newlines in my string in the plist? Thanks.
Jonathan Sterling
  • 18,003
  • 12
  • 64
  • 79
50
votes
2 answers

How to know which line of plist file is incorrect

I generate plist file for my application from file in csv format. Everything seems to be correct but when I try to build application or open plist file in XCode i Get an error informing that: mydata.plist:0: error: reading plist: The data couldn’t…
MichK
  • 2,882
  • 2
  • 26
  • 30
49
votes
8 answers

How to read data structure from .plist file into NSArray

I was creating a data structure manually using the following: NSDictionary* league1 = [[NSDictionary alloc] initWithObjectsAndKeys: @"Barclays Premier League", @"name", @"Premier League", @"shortname", @"101",…
Xetius
  • 39,461
  • 24
  • 80
  • 118
47
votes
8 answers

iOS extensions with multiple targets

In iOS 8, when we create an app extension, we have to decide which target it is attached to. The extension will have the same bundle ID's prefix as the target. Is there any way to change the target afterward? If my project contains 2 (or more)…
Enzo Tran
  • 5,590
  • 6
  • 29
  • 36
1
2 3
99 100