Closed es-kumagai closed 8 years ago
I think this issue is broader than what #235 resolves.
Using Swift, I encountered the issue in postMediaUploadFINALIZEWithMediaID, where mediaID
, expiresAfterSecs
, and size
are each an NSNumber
, but are assigned to string variables. I fixed it there by adding stringValue
in the assignments:
NSString *mediaID = [[response valueForKey:@"media_id"] stringValue];
NSString *expiresAfterSecs = [[response valueForKey:@"expires_after_secs"] stringValue];
NSString *size = [[response valueForKey:@"size"] stringValue];
I tried to modify source code to handle some numeric values in API Response as NSInteger type instead of NSString* type. Because I think that it is appropriate to treat each integer value as NSInteger rather than NSString.
Commit: 39add4f
Hello, when I call
postMediaUploadData:fileName:uploadProgressBlock:successBlock:errorBlock:
method from Swift code using with STTwitterOS authentication in OS X 10.11, I encountered the following error.This error raise when
successBlock
is called, and the instance 0x2b8037 is variable namedsize
.https://github.com/nst/STTwitter/blob/daec90ae5788cb7e8079d82b472c989d82f5e8a3/STTwitter/STTwitterAPI.m#L4335
I think the problem might be occurred when the
size
is trying to bridge from NSString (In fact, NSNumber) to Swift Native String.