Iphone application config settings

Hi,
I have a few values that are needed by my application, and I was wondering where I should put them so they persist. They are essentially settings, but they are not user configurable, so they will not be changed via a settings control, but they will occasionally change. When they do change, they need to be stored for subsequent use. Can I put them in the application mainBundle info.plist? Or do they go in the settings bundle plist even though there won't be a 'settings' configuration screen? I'd hate to implement sqlite just for the three values I need to store.
thanks,
Message was edited by: Clifford Meece

Well this might help you, I was fiddling around with the same problem to save the users current state across starts and stops of the app.
- (void)saveState {
// Saving the current state
NSUserDefaults* defaults = [[NSUserDefaults alloc] init];
[defaults setFloat:money forKey:@"Money"];
[defaults setInteger:health forKey:@"Health"];
- (void)restoreState {
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
money = [defaults floatForKey:@"Money"];
health = [defaults integerForKey:@"Health"];
You can probably interpolate from this what ever you need. You can also store objects, but of certain types only. Simple variables is easy.

Similar Messages

  • TS3694 I am using iphone 3gs, I upgraded my i-os to 6.0 from 5.1.1 however I am facing performance issue, along with this all the applications including settings or any other shuts down automatically. Is there any way by which I can use my phone in better

    I am using iphone 3gs, I upgraded my i-os to 6.0 from 5.1.1 however I am facing performance issue, along with this all the applications including settings or any other shuts down automatically. Is there any way by which I can use my phone in better way?

    No, downgrading from any version of iOS to an earlier version is not supported.

  • HT2693 what is the garmin iphone application customer service number?

    what is the garmin iphone application customer service number?
    My GPS that I bought for 60 dollars got erased after i changed my apple id.  I would like a refund or the app back.  Please help
    [email protected]

    Laxman25 wrote:
    Yea because any apps with your "old" id are attached to that Id only. You can log into the iPhone settings, store, and change the apple I'd back to your old one. Redownload it and it will work. It will only work if you are logged in with that I'd. I'm not sure you will get much of an outcome with trying to get a refund. Go to the garmin website and pull support from there.
    It is not correct that it will only work if you are logged in with the original ID. You must sign into the store with your original ID and then redownload the app from the Purchased tab. Once it's downloaded, however, you do not need to remain logged into that account. However, you'll need to enter your password for that account anytime you try to update the app.

  • I lost my iPod Touch 4th Gen. Find my iPhone application was not installed. Is there any way if I can find it or else I can lock the device so nobody uses it?

    I lost my iPod Touch 4th Gen. Find my iPhone application was not installed. Is there any way if I can find it or else I can lock the device so nobody uses it?

    lost/stolen                                      
    No app is required.                                               
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    iCloud: Find My iPhone
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                                        
    Reporting a lost or stolen Apple product                                               
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • Iphone Application Disabled

    HI
    dear sir/madam,
    i have some problems with my itunes 8.0.
    i cant access any iphone application via itunes.
    when i connect my iphone to itunes, i cant access "sync applications, all applications, selected applications" in itunes. i got all options disabled.
    please help me
    thank you

    On your iPhone, go to Settings > General > Restrictions and if Installing Apps is OFF, enter your passcode and toggle it back ON.

  • Iphone application in itunes

    In the iphone application section I am unable to access them. The screen is faded white. They are there but not accessible. Can someone help?

    I am having the same problem! I hit the "Restore" button and (a long time later after the original settings were all restored) it seemed to work for one sync. Then when I had another app upgrade via the iTunes Applications, I did the sync and now my "Applications" tab is "broken" and dimmed again, leaving me unable to sync my applications with my iPhone. I'm stuck!

  • My iphone applications wont respond what will i do?

    My iphone applications wont respond, what would i do?

    Try doing a reset of all settings. Settings >  General  > Reset  > Reset All settings.
    This will not delete any of your apps on the device. It will just rebuild the settings between the iOS and the Apps.

  • How do I install Snow Leopard while keeping files, applications, and settings

    I need to update my system, I realized that I need Snow Leopard (quiet late) before Maverick. My question is, how can I install it keeping files and all the data. I found this on Internet, does it work?
    Install Snow Leopard while keeping files, applications, and settings
    If you follow these steps, the installer will replace your operating system if one is already present, but will preserve your account information and personal files.  You may have to reinstall some applications, however.
    Insert the install disc (or the first install disc if you have more than one) into your disc drive. Restart your computer while holding down the c key. This causes your computer to start up from the install disc rather than your hard drive. When you see the gray Apple insignia, release c . 
    The Mac OS X installer should open automatically. Follow the on-screen prompts to read and accept the license agreement and begin the installation. When prompted to choose a destination disk, select your preferred location and click Install. 
    When the Mac OS X installation finishes with the disc, restart your computer. After the installation completes, a configuration program may begin automatically if you are installing for the first time. You will need to supply basic setup information for your computer. 
    Update your system software to ensure that you have the most recent operating system components.  From the Apple menu, select Software Update... , and then follow the instructions on the screen. Often, you will have to restart your computer, and you may have to run Software Update multiple times before it can completely update your system.

    That's why you need to back it up. You won't need to restore the backup immediately afterwards unless something goes wrong during the upgrade, but you'll need it later; the drive will eventually fail.
    (105428)

  • TS3899 Cannot send email from iPhone. Outgoing settings are correct. Checked against iPad setting which are OK and can send mail OK.

    Cannot send email from iPhone. Outgoing settings are correct. Checked them against iPad settings which are OK and can send mail. What can I do?

    For IOS7.02
    The user name and password are in two places. Make  sure they are correct in both locations.
    Settings>>Mail, Contacts, Calendars>>your email>>
    First spot is here under INCOMING MAIL SERVER
    Below this is OUTGOING MAIL SERVER
    Select: SMTP smtp.comcast.net>> PRIMARY SERVER :smtp.comcast.net>>second location of user name and password
    Here is the second place that the user name and password must be checked.
    I had changed my password in the first spot, but not the second spot. I had been receiving the same error message. This fixed my problem.

  • I am trying to restore my daughters iPhone because she forgot her passcode.  I'm stuck because iTunes is telling me to turn off Find my iPhone in iCloud settings but I can't do that because the phone is locked.  HELP!

    I am trying to restore my daughters iPhone because she forgot her passcode.  I'm stuck because iTunes is telling me to turn off Find my iPhone in iCloud settings but I can't do that because the phone is locked.  HELP!

    iCloud: Remove your device from Find My iPhone - Support - Apple
    Sign in to icloud.com/#find with your Apple ID (the one you use with iCloud).If you’re using another iCloud app, click the app’s name at the top of the iCloud.com window, then click Find My iPhone.
    Click All Devices, then select the device.
    Click Erase device, then enter your Apple ID password. Because the device isn’t lost, don’t enter a phone number or message.If the device is offline, the remote erase begins the next time it’s online. You’ll receive an email when the device is erased.
    When the device is erased, click Remove from Account.All your content is erased and someone else can now activate the device.

  • When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs..

    When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs... why not for the last window? I do not use tabs... just windows... I have a mouse button programmed for that. It is really irritating to have to restart Firefox all the time and then open the history window because no warning was issued!

    This is ridiculous. I've had this problems for years now and I'm finally walking away from Firefox. I use my keyboards more than my mouse, and how many times does your finger slip and hit Command Q instead of W. How come FF can't reset something as trivial as this? So many people are having problems with this?
    Feels like FF has become too big, too slow and just not cooperative anymore. What a shame, I've been using Netscape/Firefox for 13 years. This is silly.

  • My iphone application running continuously in background to access some information by "beginBackgroundTaskWithExpirationHandler" then can i submit in appstore .

    My iphone application running continuously in background to access some information by "beginBackgroundTaskWithExpirationHandler" then can i submit in appstore ?

    This is a question that should probably be posed in the Developer forum.

  • After upgrading to IOS 5.1 I no longer can see Verizon at the top of my Iphone and under settings general Network says Not Available Why is this? Did the upgrade cause this?

    after upgrading to IOS 5.1 I no longer can see Verizon at the top of my Iphone and under settings>general>Network>says Not Available Why is this? Did the upgrade cause this?
    steve

    See this tip --> http://support.apple.com/kb/TS1559
    If this doesn't resolve it you most likely have a hardware failure. Fortunately, your phone is in warranty, so if you take it to an Apple store they will replace it.

  • Can you sync 2 apple ID's for Find Iphone Application?

    My Husband & I both have IPhone/IPad/IPod & MacBooks and we have seperate Apple ID's. We would both like to be able to access all the devices under the Find IPhone application, but I can only see my devices and he can only see his. Is there a way to sync the two apple ID's? Thank you!

    Yes if she has her own user account on the MacBook.  One user account can't sync to two separate iCloud accounts.
    OT

  • I have an iPhone application already developed and it works great ,now i need to make that same application for my iPad .can someone please tell me step by step instructions on how to make it .

    i have an iPhone application already developed and it works great ,now i need to make that same application for my iPad .can someone please tell me step by step instructions on how to make it .

    Try the developer's forum:
    https://discussions.apple.com/community/developer_forums

Maybe you are looking for

  • Alternative to FM 'CRM_BUPA_SELECT_BP_SALES_AREAS'

    Within the ON_SAVE method of BP_HEAD/Overview I am retrieving the Sales areas for the current Account using FM CRM_BUPA_SELECT_BP_SALES_AREAS. However, when I enter Sales area data for the first time this FM is not returning any data. This is probabl

  • Setting System-Wide Max Heap Size

    We want to set the heap-size of Java-Plugin 1.5.0_14 for a company-wide rollout to a fixed size under Windows XP. In deployment.config under C:\Winnt\Sun\Java\deployment I am giving this: deployment.system.config=file:C:\\WINNT\\Sun\\Java\\Deployment

  • HttpSend Activity with Url Encode

    I've been using HttpSend Activity and the querystring contains some special characters. I've found the querystring is not encode automatically by the HttpSend activity. I was wondering if there's any activity or way to UrlEncode the querystring? I've

  • IPhone won't upgrade

    My iPhone 4S, 8 gig, won't update.  It says I lack storage space. (needs half a gig to update iOS)  It says I need to go to my Media Sync settings to fix this problem.  Please tell me where the media sync settings are.  Please!  (and btw, why does th

  • Changing image scan-size?

    Hi, I have an image say 630x476, that I want to cut. It's not really rescaling but I do want to get rid of part of the image, say change it to 600x400. So basically it's like cutting an image in half and leaving it totally in tact, i.e. the correct s