Jensen
unread,Jul 27, 2010, 2:56:31 AM7/27/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ObjectiveResource
Greetings!
I was using ObjectiveResource just fine with the previous iPhone SDK
(3.x).
Now, when I try to run the same App in the iOS4 SDK Simulator, it
seems the convertToRemoteExpectedType function is returning null when
attempting to POST JSON to my server (the resources are nested)
This is from the debugging console:
2010-07-26 20:49:53.000 FoodTips[1617:207] Error
Domain=org.brautaset.JSON.ErrorDomain Code=1 "Unsupported value for
key foodtip in object" UserInfo=0x5d71e10
{NSLocalizedDescription=Unsupported value for key foodtip in object}
2010-07-26 20:49:53.001 FoodTips[1617:207]
convertToRemoteExpectedType: (null)
2010-07-26 20:49:53.003 FoodTips[1617:207] Error
Domain=org.brautaset.JSON.ErrorDomain Code=1 "Unsupported value for
key foodtip in object" UserInfo=0x5a84170
{NSLocalizedDescription=Unsupported value for key foodtip in object}
If I run the same code in the 3.2 iPhone Simulator, it works just
fine.
Here's the code I'm using to POST:
NSString *tipPath = [NSString stringWithFormat:@"%@%@/%@/%@%@",
[self getRemoteSite],
@"foodtips",
@"1",
[self getRemoteCollectionName],
[self getRemoteProtocolExtension]];
Response *res = [Connection post:[theTip convertToRemoteExpectedType]
to:tipPath];
Any ideas? Thanks a bunch!