0

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

János
  • 32,867
  • 38
  • 193
  • 353
  • Please do your research, looks like you are posting a lot of CloudKit questions... http://stackoverflow.com/questions/27108714/why-cant-i-use-subscripting-on-a-ckrecord-object-in-swift – Daniel Galasko Jun 03 '15 at 12:43

1 Answers1

1

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.

Community
  • 1
  • 1
Edwin Vermeer
  • 13,017
  • 2
  • 34
  • 58