Search Results

Search found 600 results on 24 pages for 'plist'.

Page 15/24 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • I want to support UIInterfaceOrientationLandscapeRight and UIInterfaceOrientationLandscapeLeft only

    - by orangecl4now
    how do I make sure that UIInterfaceOrientationPortraitRight and UIInterfaceOrientationPortraitLeft are not supported. Basically I want my application to be used ONLY in UIInterfaceOrientationLandscapeRight and UIInterfaceOrientationLandscapeLeft I edited the Info.plist file MainWindow UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight

    Read the article

  • How to update NSMutableDictionary. My code doesn't work.

    - by dawatson833
    I've populated an array using. arrSettings = [[NSMutableArray alloc] initWithContentsOfFile:[self settingsPath]]; The file is a plist with the root as an array and then a dictionary with three three keys defined as number. I've also tried setting the keys to string. I display the values in the plist file on a view using. diaper = [[arrSettings objectAtIndex:0] objectForKey:@"Diaper Expenses"]; oil = [[arrSettings objectAtIndex:0] objectForKey:@"Oil Used"]; tree = [[arrSettings objectAtIndex:0] objectForKey:@"Wood Used"]; This code works fine, the values in the dictionary are assigned to the variables and they are displayed. The user can make changes and then press a save button. I use this code to extract the dictionary part of the array so I can update it. The assignment to editDictionary works. I've double checked the key names including case and that is correct. editDictionary = [[NSMutableDictionary alloc] init]; editDictionary = [arrSettings objectAtIndex:0]; NSNumber *myNumber = [NSNumber numberWithFloat:diaperAmount]; [editDictionary setValue:myNumber forKey:@"Diaper Expenses"]; myNumber = [NSNumber numberWithFloat:oilAmount]; [editDictionary setValue:myNumber forKey:@"Oil Used"]; myNumber = [NSNumber numberWithFloat:treeAmount]; [editDictionary setValue:myNumber forKey:@"Wood Used"]; In this example I've used a nsnumber. But I've also tried the xxxAmount field as part of SetValue instead of creating a NSNumber. Neither implementation works. Several strange things happen. Sometimes the first two setvalue statements work, but the last setvalue fails with a EXC_BAD_ACCESS failure. Other times the first setValue fails with the same error. I have no idea why the first two sometimes work. I'm at a loss of what to do next. I've tried several implentations and none of them work. Also, in the debugger how can I display the editDictionary elements. I can see editDictionary, but I don't know how to display the individual elements.

    Read the article

  • Use CFBundleIconFiles or CFBundleIcons?

    - by Pablo
    According to apple, it's better to use CFBundleIcons in plist if iOS5 or greater. Now if I use CFBundleIcons then Xcode 5 seems doesn't recognize those items, but it looks like on device proper icon is selected. I've followed option in Apple's document and provided filename with extensions for all resolutions. The icons I'm using: If I use CFBundleIconFiles then Xcode 5 will not complain, but on device wrong icon is selected (iOS5 iPad2, system selected 80px iOS7 icon instead of 72px).

    Read the article

  • Public class: The best way to store and access NSMutableDictionary?

    - by meridimus
    I have a class to help me store persistent data across sessions. The problem is I want to store a running sample of the property list or "plist" file in an NSMutableArray throughout the instance of the Persistance class so I can read and edit the values and write them back when I need to. The problem is, as the methods are publicly defined I cannot seem to access the declared NSMutableDictionary without errors. The particular error I get on compilation is: warning: 'Persistence' may not respond to '+saveData' So it kind of renders my entire process unusable until I work out this problem. Here is my full persistence class (please note, it's unfinished so it's just to show this problem): Persistence.h #import <UIKit/UIKit.h> #define kSaveFilename @"saveData.plist" @interface Persistence : NSObject { NSMutableDictionary *saveData; } @property (nonatomic, retain) NSMutableDictionary *saveData; + (NSString *)dataFilePath; + (NSDictionary *)getSaveWithCampaign:(NSUInteger)campaign andLevel:(NSUInteger)level; + (void)writeSaveWithCampaign:(NSUInteger)campaign andLevel:(NSUInteger)level withData:(NSDictionary *)saveData; + (NSString *)makeCampaign:(NSUInteger)campaign andLevelKey:(NSUInteger)level; @end Persistence.m #import "Persistence.h" @implementation Persistence @synthesize saveData; + (NSString *)dataFilePath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return [documentsDirectory stringByAppendingPathComponent:kSaveFilename]; } + (NSDictionary *)getSaveWithCampaign:(NSUInteger)campaign andLevel:(NSUInteger)level { NSString *filePath = [self dataFilePath]; if([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { NSLog(@"File found"); [[self saveData] setDictionary:[[NSDictionary alloc] initWithContentsOfFile:filePath]]; // This is where the warning "warning: 'Persistence' may not respond to '+saveData'" occurs NSString *campaignAndLevelKey = [self makeCampaign:campaign andLevelKey:level]; NSDictionary *campaignAndLevelData = [[self saveData] objectForKey:campaignAndLevelKey]; return campaignAndLevelData; } else { return nil; } } + (void)writeSaveWithCampaign:(NSUInteger)campaign andLevel:(NSUInteger)level withData:(NSDictionary *)saveData { NSString *campaignAndLevelKey = [self makeCampaign:campaign andLevelKey:level]; NSDictionary *saveDataWithKey = [[NSDictionary alloc] initWithObjectsAndKeys:saveData, campaignAndLevelKey, nil]; //[campaignAndLevelKey release]; [saveDataWithKey writeToFile:[self dataFilePath] atomically:YES]; } + (NSString *)makeCampaign:(NSUInteger)campaign andLevelKey:(NSUInteger)level { return [[NSString stringWithFormat:@"%d - ", campaign+1] stringByAppendingString:[NSString stringWithFormat:@"%d", level+1]]; } @end I call this class like any other, by including the header file in my desired location: @import "Persistence.h" Then I call the function itself like so: NSDictionary *tempSaveData = [[NSDictionary alloc] [Persistence getSaveWithCampaign:currentCampaign andLevel:currentLevel]];

    Read the article

  • Is it possible to hide the doc icon programmatically

    - by Unicorn
    Is it possible to hide doc icon programmatically on demand. I know one way by which defining property "Application is agent (UIElement)" in plist we make the cocoa app as user agent. But this result in hiding the doc icon permanently. I am looking for a way where i can control visibility of doc icon. Any idea ?

    Read the article

  • what is best way to store long term data in iphone Core Data or SQLLite?

    - by AmitSri
    Hi all, I am working on i-Phone app targeting 3.1.3 and later SDK. I want to know the best way to store user's long term data on i-phone without losing performance, consistency and security. I know, that i can use Core Data, PList and SQL-Lite for storing user specific data in custom formats.But, want to know which one is good to use without compromising app performance and scalability in near future. Thanks

    Read the article

  • MPMoviePlayerController playback problem

    - by Fahri
    Hello all, I'm having trouble with playing audio stream using MPMoviePlayerController in the background. On the foreground it's playing the audio just fine, but when the application goes to the background, sound disappears and the time keeps going. I have initialized the AVAudioSession with AVAudioSessionCategoryPlayback and have put the required background modes to audio in info.plist file. Also I have set player.useApplicationAudioSession = YES;. What could be the possible problem here? Thanks in advance :)

    Read the article

  • Loading an NSArray on iPhone from a dynamic data base url in PHP or ASP

    - by Brad
    I have a database online that I would like to be able to load into an NSArray in my app. I can use arrayWithContentsOfURL with a static file, but I really need to go to a url that generates a plist file from the database and loading it into the array. I can use ASP or PHP. I tried setting the response type to "text/xml", but that doesn't help. Any thoughts?

    Read the article

  • iPhone app identifier?

    - by Horace Ho
    What is the unique identifier for an iPhone app? In the info.plist file, there are keys: Bundle display name Executable file Bundle identifier Bundle name If I have already submitted an app on the AppStore before. Then I change some of the keys in the project. Which of the above can be changed freely and AppStore still considers my app is same as the existing one? Thanks!

    Read the article

  • In App Purchase Resources Security.

    - by jAmi
    Hi I am setting up in app purchase where user can buy different Sounds. Once bought, he can play those sounds in the App. The Sound files are all present in my Resources Folder and I just keep a record(in a plist) of the files that have been purchased. No If I right click on the IAP file and see its content I can see the Resources, hence any one can have those sounds without actually buying them. Is there a protected Bundle or something?

    Read the article

  • Explain please download file iphone

    - by Floo
    hi all ! i want to download plist from my server usibg http:// i have searched the web and everybody says use that class or that one ... but no example on how to do this. may be it is really simple but i'm a noob so if someone can explain or give a link he'll be my heroe thanks to all !!!

    Read the article

  • Is it possible to hide the dock icon programmatically

    - by Unicorn
    Is it possible to hide dock icon programmatically on demand. I know one way by which defining property "Application is agent (UIElement)" in plist we make the cocoa app as user agent. But this result in hiding the dock icon permanently. I am looking for a way where i can control visibility of dock icon. Any idea ?

    Read the article

  • iPhone SDK - How is data shared in a unversal app

    - by norskben
    Stack overflow I want to make a universal version of my app available, but I am wondering how is data managed between the iPad and the iPhone versions? -Are they completely independent? or if I have a plist in the iPad app, does it also appear in the iPhone app. If so, is there any syncing etc etc. I have a few months experience with single iPad or iPhone apps, but never a universal. Thanks again.

    Read the article

  • Key Window for background application

    - by jpoz
    Dear Cocoa Developers, I'm creating a backgrounded cocoa application. The only thing that it's missing is the ability to take text inputs! I'm making the application backgrounded by setting "Application is background only" in the Info.plist But no matter what I do I can't make any window the keyWindow. makeKeyWindow makeKeyAndOrderFront Both don't work... I know apps can do this, anyone have any idea how you can get background application to have a key window? Thanks, JPoz

    Read the article

  • Urgent help needed on How to update NSMutableDictionary. My code doesn't work.

    - by dawatson833
    I've populated an array using. arrSettings = [[NSMutableArray alloc] initWithContentsOfFile:[self settingsPath]]; The file is a plist with the root as an array and then a dictionary with three three keys defined as number. I've also tried setting the keys to string. I display the values in the plist file on a view using. diaper = [[arrSettings objectAtIndex:0] objectForKey:@"Diaper Expenses"]; oil = [[arrSettings objectAtIndex:0] objectForKey:@"Oil Used"]; tree = [[arrSettings objectAtIndex:0] objectForKey:@"Wood Used"]; This code works fine, the values in the dictionary are assigned to the variables and they are displayed. The user can make changes and then press a save button. I use this code to extract the dictionary part of the array so I can update it. The assignment to editDictionary works. I've double checked the key names including case and that is correct. editDictionary = [[NSMutableDictionary alloc] init]; editDictionary = [arrSettings objectAtIndex:0]; NSNumber *myNumber = [NSNumber numberWithFloat:diaperAmount]; [editDictionary setValue:myNumber forKey:@"Diaper Expenses"]; myNumber = [NSNumber numberWithFloat:oilAmount]; [editDictionary setValue:myNumber forKey:@"Oil Used"]; myNumber = [NSNumber numberWithFloat:treeAmount]; [editDictionary setValue:myNumber forKey:@"Wood Used"]; In this example I've used a nsnumber. But I've also tried the xxxAmount field as part of SetValue instead of creating a NSNumber. Neither implementation works. Several strange things happen. Sometimes the first two setvalue statements work, but the last setvalue fails with a EXC_BAD_ACCESS failure. Other times the first setValue fails with the same error. I have no idea why the first two sometimes work. I'm at a loss of what to do next. I've tried several implentations and none of them work. Also, in the debugger how can I display the editDictionary elements. I can see editDictionary, but I don't know how to display the individual elements.

    Read the article

  • Unable to start Tomcat 6.x when Mac OS X 10.6 is boot up

    - by SkyEagle888
    I am using Mac OS X 10.6 and installed MAMP and Tomcat. My Tomcat is installed in /Users/(userID)/Tomcat I can start Tomcat server in Terminal without a problem But it cannot be started automatically when Mac OS X is boot up. I put a file org.apache.tomcat.plist in /Library/LaunchDaemons Disabled Label org.apache.tomcat ProgramArguments /Users/henryfok/Tomcat/bin/startup.sh RunAtLoad Any hint ?

    Read the article

  • Cocoa touch: decorating text

    - by user365904
    I've added a UIAppFont to my plist, and, happily, am able to write a custom font to my display. Now, if I had to display this custom font in a very large size with a yellow outline and purple in the middle- how in the world would I achieve that??

    Read the article

  • iOS - Open certain view controller with URL scheme

    - by hansenmd
    I'm playing around with URL schemes in my app. I easily made one to open my app, just adding the necessary items to info.plist. This current URL "myappname://" takes the user to the initial view controller, FirstTableViewController, but I was wondering if it would be possible to modify that URL scheme so it I can have one that takes the user to a certain view controller, such as ThirdTableViewController. I would use this as a handy feature in something like Launch Center.

    Read the article

  • Compare filedate before download it

    - by Christian
    Hi, I have an app which is downloading several plist-files when starting the app and storing them in the NSHomeDirectory/Documents/ path. This will take some time and often there is only one file that changed. My questions are: -how can I get the date of the files (the stored one and the file on my webserver)? -how can I compare the date of the stored file with the date of the file on my webserver?

    Read the article

  • Default App Icon not appearing in iOS Simulator

    - by user577466
    I have searched quite a lot for an answer to this problem. If I have a general application, HelloWorld, and create an interface and then go to test it, then click on the Home button, not even the default grey/white icon is there like it's supposed to be. Anyone have any ideas why? I've even tried specifying a custom icon in the Info.plist file, but still nothing... I've got the latest version of Xcode and the SDK as well. (3.25 - 4.2)

    Read the article

  • Form data upload from iPhone to PHP server via https

    - by Horace Ho
    Is there a good tutorial or sample project of how to upload data from iPhone to a self-owned web server? The project is like: A survey application on iPhone which stores the user input data in a plist When there is internet connection, the program will enable an "Upload" button When the Upload button is clicked, the program will upload the data via HTTP form submit (POST) The server is Linux + MySQL + Apache + PHP The data should be sent via a https:// connection

    Read the article

  • Fail to save a managed object to core-data after its properties were updated.

    - by Tzur Gazit
    I have to trouble to create the object, but updating it fails. Here is the creation code: // Save data from pList to core data fro the first time - (void) saveToCoreData:(NSDictionary *)plistDictionary { // Create system parameter entity SystemParameters *systemParametersEntity = (SystemParameters *)[NSEntityDescription insertNewObjectForEntityForName:@"SystemParameters" inManagedObjectContext:mManagedObjectContext]; //// // GPS SIMULATOR //// NSDictionary *GpsSimulator = [plistDictionary valueForKey:@"GpsSimulator"]; [systemParametersEntity setMGpsSimulatorEnabled:[[GpsSimulator objectForKey:@"Enabled"] boolValue]]; [systemParametersEntity setMGpsSimulatorFileName:[GpsSimulator valueForKey:@"FileName"]]; [systemParametersEntity setMGpsSimulatorPlaybackSpeed:[[GpsSimulator objectForKey:@"PlaybackSpeed"] intValue]]; [self saveAction]; } During execution the cached copy is changed and then it is saved (or trying) to the database. Here is the code to save the changed copy: // Save data from pList to core data fro the first time - (void) saveSystemParametersToCoreData:(SystemParameters *)theSystemParameters { // Step 1: Select Data NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"SystemParameters" inManagedObjectContext:mManagedObjectContext]; [fetchRequest setEntity:entity]; NSError *error = nil; NSArray *items = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error]; [fetchRequest release]; if (error) { NSLog(@"CoreData: saveSystemParametersToCoreData: Unresolved error %@, %@", error, [error userInfo]); abort(); } // Step 2: Update Object SystemParameters *systemParameters = [items objectAtIndex:0]; //// // GPS SIMULATOR //// [systemParameters setMGpsSimulatorEnabled:[theSystemParameters mGpsSimulatorEnabled]]; [systemParameters setMGpsSimulatorFileName:[theSystemParameters mGpsSimulatorFileName]]; [systemParameters setMGpsSimulatorPlaybackSpeed:[theSystemParameters mGpsSimulatorPlaybackSpeed]]; // Step 3: Save Updates [self saveAction]; } As to can see, I fetch the object that I want to update, change its values and save. Here is the saving code: - (void)saveAction { NSError *error; if (![[self mManagedObjectContext] save:&error]) { NSLog(@"ERROR:saveAction. Unresolved Core Data Save error %@, %@", error, [error userInfo]); exit(-1); } } The Persistent store method: - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (mPersistentStoreCoordinator != nil) { return mPersistentStoreCoordinator; } NSString *path = [self databasePath]; NSURL *storeUrl = [NSURL fileURLWithPath:path]; NSError *error = nil; mPersistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![mPersistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return mPersistentStoreCoordinator; } There is no error but the sqLite file is not updated, hence the data is not persistent. Thanks in advance.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >