swift - Advise where to store data for iOS app -


i have created app using ionic , cordova , want remake on ios. working ios first time, , cannot figure out how store data. example: have form user has input data, inputs not in 1 view, there must several views. used create empty array , put step step, can't use same view controller on multiple views. tried core data, core data cannot store arrays. object this:

var samplearray = ( duration: 13, dayoftheweek: thursday, personlist: [   (name: rocky,    age: 26),   (name: ralph,    age:23)   ] ) 

the question be: how make input form on several views , should store data, , later able store data core data?

as first comment says, question quite large. when 'one form on several view', consider 'one form per view'. keep simple s... ;) (except if use page control form.)

basically, have 3 ways store data :

  • nsuserdefaults : store data in dictionary later use
  • file : save data file (why not .csv ?)
  • coredata : can persist arrays binary data in core data

there numerous tutorials on these topics. www.raywenderlich.com site 1 begin...


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -