I tripped into a particularly nasty bug in 1.9.4 that took me about 2 hours to find.
- Create a table without an id / primary key.
- POST to this table via (in this case) the iOS SDK.
- The post will be successfully created on the DB end.
- The response JSON dictionary will be empty.
- Inside this method from the iOS SDK NIKApiInvoker.m:
-(void) restPath: (NSString*) path
method: (NSString*) method
queryParams: (NSDictionary*) queryParams
body: (id) body
headerParams: (NSDictionary*) headerParams
contentType: (NSString*) contentType
completionBlock: (void (^)(NSDictionary*, NSError *))completionBlock
{
The response_data in the NSURLResponse block will come back as empty. The results in “completionBlock(results, nil)” will be passed to the calling block not as a dictionary but as an NSArray, causing the program to fault when it tries to send the array an Objects:ForKeys: call.
(This was particularly nasty for me in this case because it was happening inside a Grand Central Dispatch dispatch_group writing in the background to the database.)
I imagine it would be better to fix this on the DF DSP end?