plist

How To load XML file into iPhone project

旧城冷巷雨未停 提交于 2020-01-06 02:29:11
问题 I have an XML documment that I want to load for the iPhone, do I need to convert it to a plist first ? if so how ? The xml document has the following code ( for 1 chapter) <toolTipsBook> − <chapter index="1" name="Chapter Name"> <line index="1" text="line text here"/> <line index="2" text=" line text here "/> <line index="3" text=" line text here "/> <line index="4" text=" line text here "/> <line index="5" text=" line text here "/> <line index="6" text=" line text here "/> <line index="7"

Cant read data from plist

雨燕双飞 提交于 2020-01-05 12:30:23
问题 I am having trouble with reading data from my plist file. What is the correct way of extracting the values in a string? And lets say I have 2 items, how do I get both? Below will be the image on the plist. And below is the source code for the plist. I read somewhere that there could be a difference with Xcode 3 and Xcode 4. <?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>

Accessing Plist Arrays / Nodes - Objective C [duplicate]

萝らか妹 提交于 2020-01-05 07:22:49
问题 This question already has answers here : Accessing Strings Values within Plist file Arrays? (2 answers) Closed 5 years ago . I have a Property List file that I'm using to store questions and answer data. Within this file I have a collection of arrays, within these I store the different categories and questions. However I can't seem to access this data? The property file; <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs

ITMS-90037 The Info.plist file is missing or could not be parsed while app store submittion

非 Y 不嫁゛ 提交于 2020-01-03 15:20:19
问题 When I upload the app into app store, I got the mail from itunese connect with the following issue We have discovered one or more issues with your recent delivery for "***". To process your delivery, the following issues must be corrected: This bundle is invalid - The Info.plist file is missing or could not be parsed. Please check it for embedded control characters. Once these issues have been corrected, you can then redeliver the corrected binary. I have checked the info.plist file path,

swift: could not read (local) plist file to Dictionary in a playground

馋奶兔 提交于 2020-01-03 04:46:29
问题 1.I creat a new playground,and add my 2.plist to the playground's package content folder. 2.I tried: var myDict: NSDictionary? if let path = NSBundle.mainBundle().pathForResource("2", ofType:"plist"){ println(path)// "/var/folders/....../2.plist" myDict = NSDictionary(contentsOfFile: path) as? Dictionary<String, AnyObject> println(myDict)// nil let url:NSURL! = NSBundle.mainBundle().URLForResource("2", withExtension:"plist") myDict = NSDictionary(contentsOfURL: url) println(myDict) //nil var

performance of nspropertylistserialization vs nsjsonserialization

蓝咒 提交于 2020-01-03 02:40:07
问题 I'm considering making a switch from serializing data from my web service endpoint as JSON to a binary property list. I'm unserializing on Cocoa. Has anyone who has used both NSPropertyListSerialization and NSJSONSerialization noticed a difference in parsing times? I'm curious as I've read before that there's a noticeable difference—see this blog post (in the Under the Hood section) for an example by Hipmunk. Also interesting to me if there's a noticeable difference between

Problem registering file type through UTIs

瘦欲@ 提交于 2020-01-02 09:28:03
问题 I'm using AquaticPrime for license generation in my app, and as the developer guide suggests I'm attempting to register a custom file extension, such that users can simply click on the license and my application will open it and can then verify the license. To do this, I've added an exported UTI declaration to my Info.plist as follows: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key> <string>MyApp License File</string> <key>UTTypeConformsTo</key> <array>

Problem registering file type through UTIs

蹲街弑〆低调 提交于 2020-01-02 09:27:26
问题 I'm using AquaticPrime for license generation in my app, and as the developer guide suggests I'm attempting to register a custom file extension, such that users can simply click on the license and my application will open it and can then verify the license. To do this, I've added an exported UTI declaration to my Info.plist as follows: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key> <string>MyApp License File</string> <key>UTTypeConformsTo</key> <array>

ObjC Plist file read is faster then JSON?

别说谁变了你拦得住时间么 提交于 2020-01-02 04:35:08
问题 I've did this test project https://github.com/danielpetroianu/FileDeserializeBenchmarking to see what is the fastest way I can read a file from the app bundle and deserialize it. I was surprised to see that Plist files are being read faster then JSON. Since JSON files are smaller as size, I expected it to be faster. Are there some optimizations that Xcode does on Plist files on build-time ? Have I done something wrong that causes JSON deserialization take more time ? 回答1: Since JSON files are

NSDictionary's allKeys array messed up - not in the order they are in the dictionary?

☆樱花仙子☆ 提交于 2020-01-02 04:11:43
问题 in my project I'm pulling data from a .plist, more concretely from an NSDictionary. I init a dictionary with the contents of the .plist, which works well. When I then do NSArray *array = [dict allKeys]; it fills the array with all the keys, but in a totally random order, different to the order they are in the .plist file. I would really need to preserve the order. The keys in the dictionary are arrays, if that could cause a problem. What am I not getting? Thanks a lot in advance! 回答1: Much