In my application I have an UITextView, which is populated at runtime when I insert new data via an Alert Controller. To print this use data:

```
NSArray * textfields = alertController.textFields;

UITextField * urlfield = textfields [0];
UITextField * titlefield = textfields [1];
UITextField * categoryfield = textfields [2];

FeedInfo * newFeed = [[FeedInfo alloc] init];
NewFeed.feedURL = urlfield.text;
NewFeed.feedTitle = titlefield.text;
NewFeed.feedCategory = categoryfield.text;

[Self.feedArray addObject: newFeed];
[Self.tableView reloadData];

```

Where feedArray is a defined class model:

```
@interface FeedInfo : NSObject
@property (nonatomic,strong) NSString *feedURL;
@property (nonatomic,strong) NSString *feedTitle;
@property (nonatomic,strong) NSString *feedCategory;
@end

```

Next, I print the data from feedArray inside the IUTableView with:

```
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
FeedInfo *feedToShow = [self.feedArray objectAtIndex:indexPath.row];
cell.textLabel.text = feedToShow.feedTitle;
cell.detailTextLabel.text = feedToShow.feedCategory;
return cell;

```

> 
> OK. Up to here everything works fine.
> 
> 
> 

Now the problem is that before I quit the application, I want to save all the cells in the UITableView, because when the re-opening must still have all the inserted data.

I was thinking of saving all the feedArra array (1st class of this topic) by inserting this piece of code after `[self.feedArray addObject: newFeed];` and before `[self.tableView reloadData];`

```
NSUserDefaults * userDefaults = [NSUserDefaults standardUserDefaults
[UserDefaults setObject: self.feedArray forKey: @"feedArray"];
[userDefaults synchronize];

```

Within the viewDidLoad method instead:

```
NSUserDefaults * userDefaults = [NSUserDefaults standardUserDefaults];
Array = [userDefaults objectForKey: @ "feedArray"];

```

And in cellForRowAtIndexPath:

```
FeedInfo *feedToShow = [array objectAtIndex:indexPath.row];
cell.textLabel.text = feedToShow.feedTitle;
cell.detailTextLabel.text = feedToShow.feedCategory;

```

But it throws an `Exception`:

```
 RSSReader[47834:2470261] [User Defaults] Attempt to set a
 non-property-list object ("<FeedInfo: 0x600000235200>" ) as an NSUserDefaults/CFPreferences value for key feedArray 2017-07-18 11:00:13.652
 RSSReader[47834:2470261] *** Terminating app due to uncaught exception
 'NSInvalidArgumentException', reason: 'Attempt to insert non-property
 list object (
     "<FeedInfo: 0x600000235200>" ) for key feedArray'

```