plist

How to save an array of custom structs to plist swift

南笙酒味 提交于 2019-12-01 13:02:47
问题 I'm trying to save alert data to a plist, it is in the form of an array of the class alertData, all the info i can find points to encoding it, and then putting it in the array, but i'm confused as to what this does? And i also can't figure out how to do it, here's my playground: Any help would be great The class (i'm trying to save an array of these) public class alertData: NSObject, NSCoding { //Properties of the timer data - make optionals optional i.e. alert count etc. var alertCounter:

How to read OSX .plist files from Java?

荒凉一梦 提交于 2019-12-01 03:32:11
How to read OSX .plist files from Java? Imho running a commandline tool from Java is not quite the "best way to do the job". There are several much better ways to deal with binary plist in JAVA: That one I prefere is an usefull little project by Daniel Dreibrodt at: google project hosting You can also use Apache Commons Configuration (which API is supporting the Property List format). More information about the history of the .plist-format on OSX (which version introduced which format) I wrote up on my blog Update: There is a new project hosted at source forge called Property List Library ,

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

核能气质少年 提交于 2019-12-01 00:49:49
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); NSString *strPath = [[arr objectAtIndex:0] stringByAppendingPathComponent:tagString]; return strPath;

NSAllowsArbitraryLoadsInWebContent in CN1

烈酒焚心 提交于 2019-12-01 00:25:29
I'm trying to deal with Apple's http restrictions on Codename One. According to iOS Cocoa keys doc, NSAllowsArbitraryLoadsInWebContent will work on iOS 10 following these instructions: An optional Boolean value that applies only to content to be loaded into an instance of the following classes: WKWebView UIWebView (iOS only) WebView (macOS only) Set this key’s value to YES to obtain exemption from ATS policies in your app’s web views, without affecting the ATS-mandated security of your NSURLSession connections. Default value is NO. To support older versions of iOS and macOS, you can employ

How to read OSX .plist files from Java?

♀尐吖头ヾ 提交于 2019-11-30 23:05:21
问题 How to read OSX .plist files from Java? 回答1: Imho running a commandline tool from Java is not quite the "best way to do the job". There are several much better ways to deal with binary plist in JAVA: That one I prefere is an usefull little project by Daniel Dreibrodt at: google project hosting You can also use Apache Commons Configuration (which API is supporting the Property List format). More information about the history of the .plist-format on OSX (which version introduced which format) I

Parsing text from plist to NSAttributedString

点点圈 提交于 2019-11-30 22:33:48
I'm loading in text from a plist and displaying it within my app. Ideally I want to be able to specify more complex formatting such as italics, bold and superscript text, and display it in a custom label such as TTTAttributedLabel . Are there any available libraries to parse a string in a given format (preferably a simple text format such as Markdown or Textile) into an NSAttributedString? I am aware that solutions are available for parsing RTF and HTML, but this is overkill for my needs - plus I'd like the text to be easily written by hand. Edit: this is for iOS/UIKit I've just added an

Can I create a custom plist structure definition?

北城以北 提交于 2019-11-30 21:33:44
When editing plist files in Xcode, it can detect the type of plist and show human-readable strings to make it more easy to edit the file. The Info.plist, for example. Thanks to This question, I found the (or a) place where it stores that structure definition, as InfoPlistStructDefs.xcodeplugin. If I put my own file in there, however, nothing interesting happens. That is, it doesn't show up in the list of possible property list types. So does anybody know how to make Xcode or the external property list editor application recognize a custom plist structure definition? I found the answer. I have

Changing Data in a Plist

与世无争的帅哥 提交于 2019-11-30 19:31:50
问题 Hey, alright so I have a .plist that looks like; <plist version="1.0"> <dict> <key>Item 0</key> <dict> <key>Name</key> <string>Jero</string> <key>Initiative</key> <integer>0</integer> <key>EditThis</key> <false/> </dict> </dict> </plist> In the app I have it so that when one of the rows (The data is put in a UITableView) is selected it pushes to a new view controller. I would like also to set the 'EditThis' boolean to yes, so the edit view controller can learn which to edit. However I can't

Parsing text from plist to NSAttributedString

不羁的心 提交于 2019-11-30 18:01:10
问题 I'm loading in text from a plist and displaying it within my app. Ideally I want to be able to specify more complex formatting such as italics, bold and superscript text, and display it in a custom label such as TTTAttributedLabel. Are there any available libraries to parse a string in a given format (preferably a simple text format such as Markdown or Textile) into an NSAttributedString? I am aware that solutions are available for parsing RTF and HTML, but this is overkill for my needs -

Can I create a custom plist structure definition?

别说谁变了你拦得住时间么 提交于 2019-11-30 17:17:39
问题 When editing plist files in Xcode, it can detect the type of plist and show human-readable strings to make it more easy to edit the file. The Info.plist, for example. Thanks to This question, I found the (or a) place where it stores that structure definition, as InfoPlistStructDefs.xcodeplugin. If I put my own file in there, however, nothing interesting happens. That is, it doesn't show up in the list of possible property list types. So does anybody know how to make Xcode or the external