plist

Loading plist into iOS TableView

Deadly 提交于 2019-12-11 07:37:00
问题 I have a plist ( images.plist ) with the following contents As you can see, each item has a numerical key, from 0-19. Each item also has two strings (fileName and fileInfo). I'm trying to load all of the fileName's into a TableView. Here's my attempt: RosterMasterViewController.h @interface RosterMasterViewController : UITableViewController @property (nonatomic, strong) NSDictionary *roster; @end RosterMasterViewController.m @implementation RosterMasterViewController @synthesize roster =

SignIn check Credentials from Plist

让人想犯罪 __ 提交于 2019-12-11 07:27:00
问题 I have a plist with Array title and item0 , item1 , item2 is dictionary to store title and password of my app.now i want to check for signin process now i Want to check for pass and items should be matched when i press submit button to login.i Tried the below code but xcode crashes -(void)authenticateCredentials { NSMutableArray *plistArray = [NSMutableArray arrayWithArray:[self readFromPlist]]; for (int i = 0; i< [plistArray count]; i++) { if ([[[plistArray objectAtIndex:i]objectForKey:@

Downloading plist, but seem to get a cached version every time

╄→尐↘猪︶ㄣ 提交于 2019-12-11 05:19:51
问题 I have a plist on my server that I provide for an app. On launch the app downloads the plist and checks a few things before continuing with the launch. The issue I am running into is that when I update the plist on my server, the app seems to download the old version every time. At least from the console log, I am not seeing the updates I did in the plist. I am updating an integer to check and compare with an installed file, but the integer doesn't change to the new one. I am not sure whether

Saving IOS data to plist

我怕爱的太早我们不能终老 提交于 2019-12-11 05:17:11
问题 I am writing these data to plist file, but every time I write, it replaces whatever was there before. I.e it is overwriting whatever data I had previously when I reload the page. How can I make the previous data persist or could someone point out what I am not doing correctly? - (IBAction)buttonClickSave:(id)sender; { pathList=[self getFilePath]; if(![[NSFileManager defaultManager] fileExistsAtPath:pathList]) { [[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle]

Nested settings pages crash in iOS13

为君一笑 提交于 2019-12-11 04:05:51
问题 I use the iOS settings app for my app settings. However, since upgrading my device to iOS13, tapping on one of the rows that should lead to a child settings pane (Appearance, Notifications or PDF Export) causes the iOS settings app to crash, with no debug message in my debugger. This happens regardless of whether the app is the current release version compiled in XCode10, or newly compiled in XCode11. I have the following root.plist file, which contains three child settings pages. I have

Using Plists in other environments

大兔子大兔子 提交于 2019-12-11 03:06:31
问题 Are Pists limited to be used on a OSX and iOS system? I am thinking of the architecture of my app and one of many ways to import data into an iPhone app is via a Plist and you can save to it as well. Now if say that plist is able to be exported away from the app in it's raw format, will it be accesible by say Android or Windows Phone format? Or will it need to be converted? The way I understand it is that a Plist is a XML format right? I am probably wrong, but that is what I can make up of

How can I delete an array from a plist using commitEditingStyle?

梦想与她 提交于 2019-12-11 02:36:36
问题 I have a UITableView which is populated by the array keys from a plist via this code: -(void)viewWillAppear:(BOOL)animated { // get paths from root direcory NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); // get documents path NSString *documentsPath = [paths objectAtIndex:0]; // get the path to our Data/plist file NSString *plistPath = [documentsPath stringByAppendingPathComponent:@"Data.plist"]; NSMutableDictionary *dictionary =

Localization of CFBundleDisplayName doesn't work whatever I try

99封情书 提交于 2019-12-11 02:33:12
问题 could someone give me an idea how to find the problem. I have an app named "MyApp". I would like to localize the app name to German. I have a directory de.lproj in the main project directory. It contains a file Localizable.strings and that works fine. I added a InfoPlist.strings file and in there I put: CFBundleDisplayName = "Applikationsname"; But it wouldn't show the translated name, it stays on "MyApp". Here is what I tried so far: Triple checked spelling and capitalization clean all

Can't get plist URL in Swift

元气小坏坏 提交于 2019-12-11 02:31:11
问题 I'm really confused on this one. There are dozens of questions around the web asking "How do I get info from my plist file in Swift?" and the same answer is posted everywhere: let path = NSBundle.mainBundle().pathForResource("Config", ofType: "plist") However, this line produces always produces nil for me. I have replaced Config with other components found in the default plist file, but get nil as well. I am trying to access my custom ProductIdentifiers Array like so: let url = NSBundle

Data storing in plist works in simulaor but not in device

梦想的初衷 提交于 2019-12-11 00:05:05
问题 I am new to iPhone development. I have created plist such as from my previous post. It works well in simulator but not in device. I am getting the saved value from the plist and checking for the condition. When I use simulator it works but not in device. 回答1: (1) You can't write to a file in the resource folder of an iPhone. It is part of the security system of the phone that prevent malicious code from altering an application after it has been installed. (2) If you want to save new data to a