plist

what's faster on iPhone? XML pList or JSON?

荒凉一梦 提交于 2019-12-10 02:09:39
问题 Assuming both XML plist and JSON are delivered over http, gzipped, which one will be processed faster on an iPhone? 回答1: A co-worker and I did some rudimentary benchmarks recently to test which was faster for an application we were writing. We tested this JSON framework, and the NSXML parser as well as a TreeNode parser we found in an Objective-C book. Here is the note I sent to the other developers on our team: The benchmark tested how each library handled getting the filename and path of

can't find info.plist in xcode 4

梦想的初衷 提交于 2019-12-10 01:47:46
问题 So the regular intro: I am a newbie to objective c, searched everywhere and could not find, so please help... All I want to do is to set my app to get location updates in the background - THAT'S IT. I know that I suppose to add location to UIBackgroundModes in the info.plist file in my project, however I have just NO CLUE where info.plist is. All I see under my project Build Settings under Packaging is info.plist file (with Release and Debug underneath). No presence of UIBackgroundModes

Strange problem with reading and writing a plist file

穿精又带淫゛_ 提交于 2019-12-09 20:16:36
问题 I have an application that read info from I plist file. To do it I use this code below: NSData *plistData; NSString *error; NSPropertyListFormat format; id plist; localizedPath = [[NSBundle mainBundle] pathForResource:@"settings" ofType:@"plist"]; plistData = [NSData dataWithContentsOfFile:localizedPath]; plist = [NSPropertyListSerialization propertyListFromData:plistData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&error]; if (!plist) { NSLog(@"Error reading

List of all apps installed on iOS device and their position on the Home Screen (Springboard)

老子叫甜甜 提交于 2019-12-09 17:44:09
问题 I've been searching several days for a descent answer on how to acquire the list of installed applications on a device running iOS > 5.0 (com.apple.mobile.installation.plist). I've tried codes from different sources and the only almost successful solution I got was with shared URL scheme approach using Daniel Amitay API (http://www.ihasapp.com) - thumbs up for it - great job! But with the URL scheme I wasn't able to get all installed apps on the device cause not all of them have shared URL

BlackHole开发日记-设置Mac下开机启动,qmail DNS拦截

 ̄綄美尐妖づ 提交于 2019-12-09 14:27:08
今天,太阳照常升起,逃过了一劫,那就开始新的生命吧。 为了把BlackHole推广出去,想要做一个MacOS下的包。调研了mac开机启动的东西,将启动程序写成了一个plist文件,放在/Library/LaunchDaemons下面,脚本是这样的: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>blackhole.init</string> <key>ProgramArguments</key> <array> <string>/usr/local/blackhole/blackhole-start.sh</string> </array> <key>KeepAlive</key> <false/> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/tmp/blackhole.err</string> <key>StandardOutPath</key>

iOS: How to save a custom object that is created in an app

情到浓时终转凉″ 提交于 2019-12-09 07:05:16
问题 I've been reading up on saving objects, preserving state etc, but I'm still a little confused on the route I should take when saving objects that are created from my app. I have built an app where a user can create a Radio Station with the Genre, name and frequency. Once a user hits save, a "RadioStation" object is created using a custom class and is stored in an NSMutableArray that is placed in the RootViewController. While RadioStation objects can be stored in this array and are displayed

Can not find plist file in documents directory? How to modify the plist programmatically?

余生颓废 提交于 2019-12-09 01:08:39
问题 I have an application in Xcode 4.2. I have created plist file as my requirement. I have found the data from Applications main bundle and got the data in to the array. But As I want to modify the plist data at run time, I could not find it in Documents Directory Actually I want to modify the plist programmatically. Though I am not using mainbundle. -(NSString *) saveFilePath::(NSString *)tagString { NSArray *arr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

Mac File association not working. Why or how to debug?

假如想象 提交于 2019-12-09 00:10:05
问题 I have the following Info.plist which I am attempting to associate .mybin files with the applcation. However after installing the .mybin files do not have the icon, the description or the association (when viewing with Get Info). I'm completely new to OSX development and I inherited the packaging of the application so I have no idea how to debug problems. The app is packaged to a .app using productbuild if that makes any difference. I have compared my info.plist against several other

dictionaryWithContentsOfFile returning nil from my property list file

好久不见. 提交于 2019-12-08 17:22:50
问题 I'm learning how to use plist files for storing data in my iPhone app. I've been reading a bunch of the questions about plist and dictionaryWithContentsOfFile on this site, but can't see what I'm doing wrong. The following line returns nil ("The dictionary is null" to the console). NSLog(@"The dictionary is %@",[NSDictionary dictionaryWithContentsOfFile:@"myFile"]); The myFile.plist file is in the resources folder, and contains a few strings: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE

Alphabetical plist with name and description numberOfRowsInSection issues

╄→尐↘猪︶ㄣ 提交于 2019-12-08 11:22:15
问题 So, I have a plist that describes multiple cuisines. In my plist, I have 26 arrays, each with a key of a letter of the alphabet. In those arrays, contain multiple cuisines, which are dictionaries. In every dictionary are 2 strings, one for the name of the cuisine and the other for the description of the cuisine. I am very close to implementing this inside a table view controller but I am having a few issues. The main issue is accessing the names and putting it in an array so that it can be