I'm presently using the mobile SDK with native iOS to download VersionData of content objects thus:
SFRestRequest *request = [[SFRestRequest alloc] init]; request.endpoint = @"services/data/v28.0/sobjects/ContentVersion/"; request.method = SFRestMethodGET; request.path = [NSString stringWithFormat:@"%@/VersionData",contentVersionId]; request.parseResponse = NO; [request setAccessibilityLabel:[[NSString alloc] initWithFormat:@"%d", roReadDoc]]; [[SFRestAPI sharedInstance] send:request delegate:_delegate];
This works well on LTE with PDFs of reasonable size (a few MB). However with larger MP4s, I seem to encounter timeout issues.
Is there a better way to download VersionData ie. chunked or streamed, using the API?
Another issue I have is simply that the MP4 will not play in either a UIWebView or MPMoviePlayerController. I have read the following links, which seem to describe my issue, but haven't found an answer yet as to why MP4s from Salesforce seem to be in the incorrect format, or otherwise incompatible. Any idea? Thanks!
Edit added: after further investigation it appears to me that a legacy app we are using seems to get this working using an http call in the format