0

I want to update an array of strings that is inside of a LBModel, I can only think of using the saveWithSuccess method, but it is not working, how can I update an information in Loopback's iOS SDK?

C. Porto
  • 631
  • 3
  • 12
  • 26
  • What errors do you see? – Raymond Feng Oct 24 '14 at 15:48
  • when I use this code `[teacher.courses addObject:course]; [teacher setObject:teacher.courses forKeyedSubscript:@"courses"]; [teacher saveWithSuccess:^{ } failure:^(NSError *error) { NSLog(@"Error: %@", error);}];`, I have the following exception `'NSInternalInconsistencyException', reason: '-[__NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'`, if I take away the first line `[teacher.courses addObject:course]` then my exception becomes `'NSInternalInconsistencyException', reason: 'Invalid repository.'`. – C. Porto Oct 24 '14 at 18:10

0 Answers0