How to save Array of Array to iCloud?

var s: Array(repeating: Array(repeating:0, count:18), count:30)

Which field type to save the above to iCloud? Int(64) (List)?

Replies

convert array of array to array of int? how to convert to

FlattenCollection? joined()?

One approach is to turn the entire array into an NSData object using NSKeyedArchiver.

Another approach is to save each array separately.

And a third array is to construct one long array with 30*18 elements.

I think in all cases you will need to convert int X to [NSNumber numberWithInt:X]