Does subscript operator work for CKRecord?

75 Views Asked by At

I want to use subscript operator like docs show: myRecord[@"firstName"] = @"Jacob";

but can't get it to work in Swift.

Any idea why?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

On this post you can see an explanation why subscripting CKRecord does not work and why you also can not add your own.

Stack overflow when defining subscript on CKRecord in Swift

There is however a sample of a workaround that comes close.