Managing runtime Application Data

Discussion in 'iOS Programming' started by Stella, Jan 5, 2010.

  1. Stella macrumors 604

    Stella

    Joined:
    Apr 21, 2003
    Location:
    Canada
    #1
    Hi,

    I'm wondering the best method for managing runtime application data. By "Application Data" I mean data that is used during application runtime - data entities et al, but these don't necessary need to be persisted to the Touch 'disk'.

    I could create singleton classes that any form controller / other classes can reference at will. I'm wondering if there is a better way?

    A lot of UI objects do have the 'datasource' Outlet but it would be tedious to link these up to data objects.

    So, I'm wondering what other people do to manage run time app data?

    Thanks
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Singletons are certainly a solution, sure. You could also use NSUserDefaults. Or add properties to the appDelegate (a singleton itself). You could also consider using CoreData or perhaps even a SQLite database. And there are probably other approaches that I've missed.
     
  3. Stella thread starter macrumors 604

    Stella

    Joined:
    Apr 21, 2003
    Location:
    Canada
    #3
    Thanks, if singleton's are 'ok' for objectiveC then i'll keep with that - coreData is a bit overkill.
     

Share This Page