title: Saving an Array to Core Data
body: <p>I'm trying to save an array to Core Data. I've been reviewing the following thread: <a href="https://stackoverflow.com/questions/537044/storing-custom-objects-in-an-nsmutablearray-in-nsuserdefaults">Storing custom objects in an NSMutableArray in NSUserDefaults</a> (in particular the answer from Stefan). My code is as follows:</p>
  
  <pre><code>for (TempWorkout *newTempWorkout in items) 
          {
              NSString *strCounterInt = [NSString stringWithFormat:@"%d", counterInt];
              newTempWorkout.temp_time = strCounterInt; 
              newTempWorkout.temp_route = route.text;
              newTempWorkout.temp_activity = activity.text;
              newTempWorkout.temp_intensity = intensity.text;
              NSString *strTotalDistance = [NSString stringWithFormat:@"%.3f", totalDistance];
              newTempWorkout.temp_distance = strTotalDistance;
              newTempWorkout.temp_mapID = mapID;
  
              [[NSUserDefaults standardUserDefaults] setObject:[NSKeyedArchiver archivedDataWithRootObject:startTimeArray] forKey:@"temp_start_time"];
  
              [self.tempWorkoutArray addObject:newTempWorkout];   
          }
  </code></pre>
  
  <p>The above code works, but when I look at my table (via SQLITE Manager in the browser), I don't see any values for key 'temp_start_time'.</p>
  
  <p>Regards,
  Stephen</p>