SkygearIO / skygear-SDK-iOS

Skygear SDK for iOS
https://skygear.io
Other
10 stars 28 forks source link

[SKYDatabase-saveSubscription:completionHandler:] would always fail to save a subscription #23

Closed limouren closed 8 years ago

limouren commented 8 years ago

Using the method to save subscription would always lead to the follow error:

Error Domain=SKYOperationErrorDomain Code=108 "The server is unable to process the data." UserInfo={SKYErrorName=InvalidArgument, SKYErrorMessage=empty device_id, NSErrorFailingURLKey=http://127.0.0.1:3000/subscription/save, SKYOperationErrorHTTPStatusCodeKey=400, arguments=<CFArray 0x79889ba0 [0x56181f8]>{type = immutable, count = 1, values = (
    0 : <CFString 0x798810f0 [0x56181f8]>{contents = "device_id"}
)}, NSLocalizedDescription=The server is unable to process the data.}

skygear-server now requires subscription:save to supply device_id, but saveSubscription:completionHandler: didn't, leading to this error.

cheungpat commented 8 years ago

@limouren will you work on this? some information is attached to #26 btw

limouren commented 8 years ago

@cheungpat I regard this as an problem on function interface and created PR #24.

If you think it could correctly address #26, merge #24 and we are done.

cheungpat commented 8 years ago

@limouren Not sure what “functional interface” means outside the realm of Java.

limouren commented 8 years ago

@cheungpat Err. I should have said API.