Yes,
I have looked at those values several times (including NSLogging them) and they are perfectly set.
I wonder what it's the main difference with the exampled code for YouTube:
- (IBAction)uploadClicked:(id)sender
{
[mUploadProgressView setHidden:NO];
GDataServiceGoogleYouTube *service = [self youTubeService];
[service setYouTubeDeveloperKey:DEVELOPER_KEY];
NSString *username = kYoutubeUsername;
NSURL *url = [GDataServiceGoogleYouTube youTubeUploadURLForUserID:username];
// load the file data
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"100_1142" ofType:@"mov"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
NSString *filename = [filePath lastPathComponent];
// gather all the metadata needed for the mediaGroup
NSString *titleStr = mTitleField.text;
GDataMediaTitle *title = [GDataMediaTitle textConstructWithString:titleStr];
GDataMediaCategory *category = [GDataMediaCategory mediaCategoryWithString:@"Entertainment"];
[category setScheme:kGDataSchemeYouTubeCategory];
NSString *descStr = mDescriptionField.text;
GDataMediaDescription *desc = [GDataMediaDescription textConstructWithString:descStr];
NSString *keywordsStr = mKeywordsField.text;
GDataMediaKeywords *keywords = [GDataMediaKeywords keywordsWithString:keywordsStr];
BOOL isPrivate = ([mPrivateSwitch state] == YES);
GDataYouTubeMediaGroup *mediaGroup = [GDataYouTubeMediaGroup mediaGroup];
[mediaGroup setMediaTitle:title];
[mediaGroup setMediaDescription:desc];
[mediaGroup addMediaCategory:category];
[mediaGroup setMediaKeywords:keywords];
[mediaGroup setIsPrivate:isPrivate];
NSString *mimeType = [GDataUtilities MIMETypeForFileAtPath:filePath
defaultMIMEType:@"video/mov"];
// create the upload entry with the mediaGroup and the file data
GDataEntryYouTubeUpload *entry = [GDataEntryYouTubeUpload uploadEntryWithMediaGroup:mediaGroup
data:data
MIMEType:mimeType
slug:filename];
SEL progressSel = @selector(ticket:hasDeliveredByteCount:ofTotalByteCount:);
[service setServiceUploadProgressSelector:progressSel];
GDataServiceTicket *ticket;
ticket = [service fetchEntryByInsertingEntry:entry
forFeedURL:url
delegate:self
didFinishSelector:@selector(uploadTicket:finishedWithEntry:error:)];
[self setUploadTicket:ticket];
[self updateUI];
}
Since we're developing we have hardcoded the category (an existing one) and the video file (added to the project) as you can see.
Any idea that the group may have is going to be kindly received!
Thanks in advance!
Marcos Jesús Vivar
iOS Developer
Twitter | LinkedIn | Tumblr