Particularly nasty 1.9.4 bug

I tripped into a particularly nasty bug in 1.9.4 that took me about 2 hours to find.

  1. Create a table without an id / primary key.
  2. POST to this table via (in this case) the iOS SDK.
  3. The post will be successfully created on the DB end.
  4. The response JSON dictionary will be empty.
  5. 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?

Our iOS SDK guy @cfoody is taking a look this week to see what changes might be needed. This doesn’t appear to be inherent to DreamFactory 1.9.4, but rather a part of the SDK.

Sorry for the delay. Thanks for letting us know about this. I am having some trouble reproducing your problem. What request did you use to create the table? How did you reference the table once you created it?