[iphone sdk] best place for preference init

I'm following the iPhone sample Prefs app. It does all the prefs init in applicationDidFinishLaunching.
However, I'm finding in my own app that this isn't cutting it. I have view controllers that are also concurrently getting cranked up and trying to use the preferences that may not have been fully loaded into variables yet for everyone to use.
Where else can I put the pref init code to make sure it completes before anything else? Should I stick it in my main.m? The only other option is for every little bit of code that uses preferences to do a check and wait. Just curious what best practices are in this case.
Thanks

If you are just setting up NSUserDefaults, you can do it initialize. here's a snippet from the apple example metronome /Classes/MetronomeAppDelegate.m
// +initialize is invoked before the class receives any other messages, so it
// is a good place to set up application defaults
+ (void)initialize {
if ([self class] == [MetronomeAppDelegate class]) {
// Register a default value for the time signature.
// This will be used if the user hasn't already specified a preferred time signature.
NSNumber *defaultTimeSignature = [NSNumber numberWithInt:TimeSignatureFourFour];
NSDictionary *resourceDict = [NSDictionary dictionaryWithObject:defaultTimeSignature forKey:MetronomeTimeSignatureKey];
[[NSUserDefaults standardUserDefaults] registerDefaults:resourceDict];
Some things won't be available at that point but for the setup it's a pretty good place.

Similar Messages

  • The best place for content server

    Hello,
    We need to install content Server . SAP ECC is in Paris .
    The users who will use the content server will be in New-York.
    Is the best place for content server in Paris or in New-York?
    The question could be : Will a document (for ex. a pdf of 100 Mb) to be checked_in the CS be first transferred from frontend to ECC and then from ECC to CS or directly from frontend to content server ?
    Thanks

    Hi Oda,
    If your users are in New-York, then better to have content server there to optimize network traffic and speed. There is something called as distributed content server concept where you can have different storage areas for different geographical locations.
    And as far as i know, whenever files are checked-in, they are directly stored in content server and it will not route through the ECC. Only DIR stored in the ECC will be linked to the file in the content server.
    Hope this helps.
    Regards,
    Ravi

  • Where is the best place for suggestiong requesting features?

    Where is the best place for suggesting/requesting features?
    If something like this already exists, please let me know.
    I often wish when I select a word to right click and choose dictionary to to find out the meaning of the word. Currently I have to copy, go to a dictionary web page, paste and search. And I spent a lot of time for that. I'm not that technically oriented to suggest how this can be achieved but just as an idea, may be Mozilla can partner with dictionary web sites by making a plug ins or include a dictionary with Firefox itself

    I am sure there are Extensions that do this.
    DictionarySearch - https://addons.mozilla.org/en-US/firefox/addon/68/
    Add-on search for Dictionary - https://addons.mozilla.org/en-US/firefox/search/?q=dictionary&cat=all&lver=any&pid=1&sort=&pp=20&lup=&advanced=
    Feedback - http://hendrix.mozilla.org/

  • Best place for CUA

    We've got ECC, BW, XI, EP, SolutionManager installed and want to implement CUA.
    I want to know your comment on:
    One CUA or more CUAs, we have 3 systems (DEV, QAS, PRD) landscape for each system.
    *Where is the best place for CUA?
    TIA.

    Hi Team FI,
    There are other factors that may be considered when deciding where to put CUA.  For example:
    Are you using Indirect Assignment of roles also?  If so, then simplicity would say, put the CUA on the same system as the HR module (saves having to ALE over the PD object -> Role relationships to different CUA system).
    High availability - normally your ECC system would have the highest availability due to the critical nature and impact on business, so it would make sense to put it on your ECC system if this is the leading factor.
    What is your role integration strategy like?  I know some clients that have excellent integration across all systems such that a 'role' is defined as all of the access that you require inclusive of all SAP systems, and LDAPs.  If this is the case, then you can have a single CUA system.  Assign ONE composite role to the user, which then provisions out single roles to all of the other SAP systems (including non-prod) and synchronises with your LDAP.  If your role integration is not as 'good' as this, then you may consider having two CUA systems.  One for the prod systems, and the other for the non-prod systems.

  • Best place for LR catalog (.lrcat) file?

    I'm putting together a new PC running Vista and am trying to figure out the best place for the LR catalog (lrcat) file. This PC has multiple hard drives as follows:
    C: OS and apps
    D: non-photo files (docs, mp3s, etc)
    E: photo files
    F: video files
    All the drives are comparable in read/write speed. The Lightroom app will be installed on the C: drive, and the LR catalog will consist of the images on the E: drive. While working in LR, I sometimes listen to mp3s stored on the D: drive. I'm assuming that the best place for the lrcat file is the F: drive (since I seldom access that drive while working in LR). Does this make sense? Or should the lrcat file go somewhere else?
    On a side note, on my last PC, I had the lrcat file in what was originally a dedicated scratch drive (for PS), but I'm doing less and less in Photoshop these days, and my new system will have 12GB of ram, so I decided to do without a dedicated scratch drive for the new system.
    Any advise appreciated.

    Asking yourself the following questions may help determine which drive is best suited for storing the Lightroom Catalog:
    1) Are you the only person using the "Lightroom computer"?
    2) Do you have multiple log on accounts?
    3) Do multiple log on accounts need access to the Lightroom Catalog?
    If you answer yes to #1, its default location might be fine.  If you answer yes to #2 or #3, you should concider a central location for the .lrcat file.
    By default, the .lrcat file is located in a users document folder.  This means that at least one (1) .lrcat file will be created per user account.  Seeing that you usually keep photo files on the E Drive, creating a folder on the root of the E Drive might not be a bad idea.  Using the root of E schema will then allow mutiple users to access the .lrcat file when they log on.  Using the E Drive keeps "photo related" files together, thought Drive D or Drive F would also work.  It appears from your description that you keep O/S and Applications only on the C Drive, which I do myself.
    Hope that helps!

  • Best place for abap

    what is the best place for abap searching

    hi
    good
    abap searching means?
    if you r talking about URL than it is
    www.sapgenie.com
    www.abap4u.com
    if you r talking about TCode than it is
    ABAPDOCU.
    thanks
    mrutyun^

  • Best place for S60 v5 Applications?

    I assume the best place for applications for my 5800 (or any other device) WILL BE the Ovi store.
    But until it launches, where have we found to be the best place to get reliable apps?

    have a look here there is lots of great apps here free and themes and games enjoy
    http://dailymobile.se/
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Best place for the sub.

    Hi,
    I have a 2.1 speaker system (I-trigue 3400) and was wondering if anybody knows the best place to put the sub so you can hear the deep bass more, it is infront of my legs now, and when i bend down i can hear more, but when i put it above my head i cant hear it again.

    To find the best place for a sub is quite complicated. The distance from walls, corners and other objects makes a huge difference. One way is to place the sub where you will be sitting; put it as close to where your head will be as you can. Then play some music with nice deep bass and crawl around the floor. You should notice that there are areas where the bass is louder, these are the best spots to place the sub.

  • Best place for DSL wireless router to aquire strongest signal

    Hi all
    I have a Westell DSL wireless router sitting on a Kensington surge protection base with antennas pointing straight up. Is this ok? My wireless internet connection is ok for now. What's the best place for my wireless router for the strongest possible signal?
    Thanks for your help
    Web dude

    Place it clear of HVAC ducting and away from any microwave or cordless phone base stations(s) in the house - these are the primary causes of wifi interference/noise and signal outages. Consider the area you want to cover (including any outdoor areas) and place the unit as near the center as possible.
    Download a copy of AP Grapher and observe the signal quality in your intended reception area(s) to help place the router optimally for best signal and lowest noise, including rotating the antennas if needed - vertical is perfectly OK, but you may get marginally better signal or lower noise by rotating them.
    AP Grapher can be downloaded from http://www.chimoosoft.com/products/apgrapher/

  • My daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks

    my daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks

    If you know that you will not be asked to design GUI interfaces, and the C programming course will adhere to command line compilation environments, then get the Xcode command-line developer tools, and skip the extra complication of Xcode until you absolutely need it. Apple has kicked GNU C to the curb and is rightly so, using Clang/LLVM compiler technology.
    Sign up for a free Apple Developer account using your Apple ID, and then visit the Mac Dev Center, and towards the bottom of the page, you will see additional downloads. Click on the associated, all down loads link. Know your OS X version beforehand, as the command-line tool releases are tied to general operating system versions, and the most recent Xcode version.  That said, there are currently two March 9, 2015 command-line tools for Xcode 6.2 — one for OS X 10.9 Mavericks, and the other for OS X Yosemite.

  • Which version of iPhone SDK is available for MAC OS 10.3.9

    Hi,
    I want to develop an application for iPhone using my MAC OS 10.3.9 version.
    Which version of iPhone SDK is available for MAC OS 10.3.9?
    Can I install and work with iPhone SDK 6 or 7 version on MAC OS 10.3.9.
    Regards,
    Punit

    but the installation steps of SDK says that it can be installed on MAC OS 9.3.x also by customizing it during installation for the MAC OS 9.3.x.
    If possible, could you post a link to where this information is.
    OS 9 does not have a version 9.3.x so I am not sure what you are referring to unless that was a typo and you meant 10.3.x?
    I think you might get better support in the Developer forum. If you don't receive any other response here in this topic perhaps posting there might attract more knowledgable SDK users.
    littleshoulders
    Message was edited by: littleshoulders
    Message was edited by: littleshoulders

  • Best place for non-timecoded media?

    I store all of my video clips on my external media drive. But what about graphics, music, stills, etc? Should I place these on my internal for storage for ongoing projects?
    Best.
    Tom

    My preference is to keep as much as possible in the same event and on the same drive. Although I can't prove it, my theory is that having files scattered across different drives and different events during the editing process contributes to the frequency of beachballs and crashes.
    But if at the end of the project, stuff is scattered, or I can't remember what and where stuff resides, FCP has some archiving tools that collect and organize files into a single location.
    Duplicate a project (the BU). Select Duplicate Project and Used Clips from the dialogue window. Create a new event (leave the render file box unchecked unless you have more storage space than you will ever need.
    Go into FCP menu>File>Organize Event Files and all the files that relate to the project being archived will be collected and put in the location you chose.
    HTH.
    Russ

  • Best place for spare parts for PPC 1.5 Mini?

    Hi.
    I'm looking for the best place to get spare parts for a Mac Mini PPC G4 1.5GHz on the net. The fan is most likely giving up, because it has recently begun to sound as the bearings in the fan are bad.
    Regards,
    /Mysteron

    Hi Mysteron-
    I've used these folks for other projects: MAC-PRO
    If you don't see what you need or have questions try giving them a call as they are very helpful.
    Luck-
    -DP

  • Best place for scratch files, imported video on laptop with single drive

    Hi all,
    I read that is was best to put the scratch files on a disk other than that the program resides on, so I did. That makes sense.
    But later, when I was reading about people's problems with CS4 crashing, I read I'm not meant to be using USB drives .... so, my question is:
    On a laptop with a single hard disk and a USB external drive, where is the best place? Do the performance problems with scratch files on a single disk trump those of using USB or vice versa.
    Perhaps its something I'll have to try myself but wondering about other people's experience.
    Cheers

    I'm with Harm on the eSATA. I will say that FW-800 works for me, but as more of my externals offer eSATA now, I'll probably migrate to that connection very soon. Even with 3x 200GB 7200RPM SATA II HDD's on my laptop, I do a lot of work with externals, 'cause I migrate the Projects to my workstation. Just remember to set a unique drive letter for the external(s) in the OS of all computers, or you WILL have issues. An eSATA card is cheap, though your externals need to have the connection. Externals are also cheaper now. I'm paying the same for 2TB units, that I paid for 250GB ones, when they first came out! For what I paid for a 1.5TB RAID NAS, I could now get 16TB in a hot-swappable enclosure.
    As for USB's, I tried that years ago, and gave up in frustration. The connection was just too slow, and often timed out, or worse. I'd not do that again, on a bet - sorry, but I am too impatient and then there were the crashes...
    Hunt

  • Best place for Contacts

    What have people found is the best place to use as their master contact list?  I use Outlook 2010 with gSyncit for Gmail. I really don't care about having my Facebook contacts in my Droid since I don't use Facebook that much. I've turned that out. Is Outlook the best place and let gSyncit push them up to Gmail which will sync them with my Droid? Just looking for others experience.

    I have noticed a lot of droid users using this particular method.

Maybe you are looking for

  • I can no longer activate home sharing on my Apple TV

    I have an Apple TV 2nd (or 3rd) generation. It was working fine until I updated the firmware one month ago. I can no longer activate home sharing. The WIFI connection works fine as I was able to restore the device. Home sharing is active on my comput

  • How to take print of original po and amendment po from po transaction

    hi everybody i want a print out for original po and amendment po.actually my original po is sended to vendor after that i made some amendments for the same po .i.e., amended one depending upon versions i want printout anybody can suggest me.....

  • System preferences, sharing, remote management?

    Hello, Could someone tell me where I can find more information of how to use remote management that is under system preferences, sharing. What is the difference between screen sharing and remote management? It will be a great help as I am learning my

  • Using table as detailStamp

    i use selectOneChoice as detailStamp, the data is correct. bu when i use a table as detailStampm there is noi data any more. i just want to use table as detailStampm

  • SQLJ in Applet: Open connection to 3rd machine?

    If a client machine download applet with sqlj from web server, is possible to open connection directly to database on 3rd machine? Or is prevented by java applet security? Rathu