plist

plist localization problem

ぐ巨炮叔叔 提交于 2019-12-12 11:52:27
问题 I have a weird problem with my plist. I'm working with xcode 4. Whenever I try to put a localization on this plist, I can't edit it. I mean, when I edit and change a value in the plist, the application still take the old one. Even if I delete it, I still have my old plist loaded ... I don't know if someone already got the same problem but it would help me a lot !! Thanks 回答1: The simulator and the device cache the localized data. You need to remove all the data from them to see the changes,

Write JSON Response to .plist File

醉酒当歌 提交于 2019-12-12 08:25:40
问题 Frustration on the Top !!! I am getting some JSON Response from the Service and I want to store it in the .plist file for Future Reference. I am unable to save my JSON Response to .plist File . I think it's due to some null values into the Response. Note : I confirmed that the Response is in JSON Format using jsonparser. My Code : NSError *error; NSDictionary* json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error]; NSDictionary *dictResult = [(NSDictionary*)json

Filemaker: exporting a PLIST (for iOS)

被刻印的时光 ゝ 提交于 2019-12-12 05:48:31
问题 I have a database which I want to export as an iOS compatible PLIST. The work around I have come up with is to create a calculated field which adds the tagged padding and header and creates a report using these fields. I then export the preview of the report as a PDF, open the PDF in Acrobat Reader, select all text, copy and paste into XCode which recognises the PLIST format and all works as expected. Is there a better way of doing this? (This seems a really convoluted way of doing things,

Adding dictionaries to Plist programmatically

▼魔方 西西 提交于 2019-12-12 04:53:57
问题 I am trying to add a dictionary to a plist programmatically in the following format: Root(Dict) | StringOfViewID(Dict) | ButtonTitle(Dict) | String String I can successfully do this but I want to keep adding to the ViewID(Dict) more ButtonTitle(Dict) under the same ViewID(Dict). So far I can only replace the existing. Something like this: Root(Dict) | StringOfViewID(Dict) - ButtonTitle(Dict)(2)-String String | ButtonTitle(Dict)(1) | String String Here is the code I'm using: //Initialize and

How to get the plist file lists in project

孤街醉人 提交于 2019-12-12 04:33:30
问题 I have a few data files like AAA.plist BBB.plist CCC.plist I would like to get the list of these plist file. If I know the file name in advance, I can get the file like this. let path : String = Bundle.main.path(forResource: "AAA", ofType: "plist")! var qplist = NSArray(contentsOfFile: path) However I want to get the plist file list in case of not knowing the file name in advance. 回答1: You can use urls(forResourcesWithExtension:subdirectory:) for that. if let urls = Bundle.main.urls

Objective-C best choice for saving data

瘦欲@ 提交于 2019-12-12 04:31:08
问题 I'm currently looking for the best way to save data in my iPhone application; data that will persist between opening and closing of the application. I've looked into archiving using a NSKeyedArchiver and I have been successful in making it work. However, I've noticed that if I try to save multiple objects, they keep getting overwritten every time I save. (Essentially, the user will be able to create a list of things he/she wants, save the list, create a few more lists, save them all, then be

Question regarding the iPhone In App Purchase capabilities

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:24:53
问题 I am working on releasing an app that will greatly benefit from using the in app purchase model. The app is a sort of book viewer, and the content I would like to make available for purchase will be more books in various languages. Each book is stored in sqlite format, in separate .db files. Now, the way that my developer has set it all up is that he added a line onto the bottom of the info.plist file called databases. Inside that database section, I can type in 'es' as the key, and for the

Creating Multiple Plist files in document directory..?

三世轮回 提交于 2019-12-12 04:24:20
问题 I am developing an application which includes 5 plist files. I want to save all those files in documents directory. Because I want to add data to them dynamically. I am Creating a plist path using Retrieving data from plist NSMutableArray *pathsArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docpath = [pathsArray objectAtIndex:0]; NSString *scorePlistPath = [docpath stringByAppendingPathComponent:@"highScores.plist"]; if (![[NSFileManager

How to get the values from plist in Android?

烂漫一生 提交于 2019-12-12 03:33:32
问题 Currently i am working in Android application, Using plist to store some values in Resource folder, then i get the local plist value from Resource in Android, but i cannot get these, How to parse local plist value in Android? please help me Thanks Here i mentioned Plist value here <?xml version="1.0" encoding="UTF-8"?> <array> <dict> <key>Code</key> <string>11</string> <key>Country</key> <string>Afghanistan</string> </dict> <dict> <key>Code</key> <string>12213</string> <key>Country</key>

Strange bug with plist

喜夏-厌秋 提交于 2019-12-12 02:09:37
问题 I got a very strange bug when I'm trying to read my plist. My plist looks like : Root (Array) Item 0 (Dictionary) title (String) I want to display title in the log, so I did the code bellow: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; NSString *path = [basePath stringByAppendingPathComponent:@"data.plist"]; NSMutableDictionary *dict = [[NSDictionary