-1

I have an Array containing Structs. I want to persistently store it. Core Data is a bit complicated for my liking! I've tried using an NSKeyedArchiver but It comes up with the error "cannot invoke achieve root object with an argument list of type ([Struct], toFile: String)

Any ideas would be really appreciated!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Try this solution http://stackoverflow.com/questions/28916535/swift-structs-to-nsdata-and-back – tek3 Jul 20 '15 at 21:24

1 Answers1

1

NSKeyedArchiver / NSKeyedUnarchiver serializes serializes -compliant types to and from a data representation. So you will need to serialize your struct to persist.

agy
  • 2,804
  • 2
  • 15
  • 22