0
votes

I'm playing with the object-c API (Gdata) of google to interact with youtube (in my case) but i'm running into a problem. I'm trying to search a youtube video with the query class:

NSURL *feedURL = [GDataServiceGoogleYouTube youTubeURLForFeedID:nil];
    GDataQueryYouTube *query = [GDataQueryYouTube youTubeQueryWithFeedURL:feedURL];


    [query setVideoQuery:@"\"Fred Flintstone\""];

    ticket = [service fetchFeedWithQuery:query
                               delegate:self
                      didFinishSelector:@selector(entryListFetchTicket:finishedWithFeed:)];


    [ticket setShouldFollowNextLinks:NO];

But when i execute it i have this error in the consol (the call back entryListFetchTicket is not even called)

2011-03-07 13:48:35.625 samsungTV[23061:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSInvocation invocationWithMethodSignature:]: method signature argument cannot be nil' * Call stack at first throw: ( 0 CoreFoundation
0x011ddbe9 exceptionPreprocess + 185 1 libobjc.A.dylib
0x013325c2 objc_exception_throw + 47 2 CoreFoundation
0x0114db09 +[NSInvocation invocationWithMethodSignature:] + 553 3 samsungTV
0x00018d34 +[GDataServiceBase invokeCallback:target:ticket:object:error:] + 83 4 samsungTV 0x000184a5 -[GDataServiceBase handleParsedObjectForFetcher:] + 840 5 Foundation
0x003709a6 __NSThreadPerformPerform + 251 6 CoreFoundation
0x011bf01f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 15 7 CoreFoundation 0x0111d28b __CFRunLoopDoSources0 + 571 8 CoreFoundation
0x0111c786 __CFRunLoopRun + 470 9
CoreFoundation
0x0111c240 CFRunLoopRunSpecific + 208 10 CoreFoundation
0x0111c161 CFRunLoopRunInMode + 97 11 GraphicsServices
0x018f9268 GSEventRunModal + 217 12 GraphicsServices
0x018f932d GSEventRun + 115 13 UIKit 0x0060042e UIApplicationMain + 1160 14 samsungTV
0x00002964 main + 102 15 samsungTV
0x000028f5 start + 53 ) terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”.

I have no idea why...

But in the othr hand if i uses feed it works...

NSURL *feedURL;
    feedURL = [GDataServiceGoogleYouTube youTubeURLForFeedID:kGDataYouTubeFeedIDMostPopular];


    ticket = [service fetchFeedWithURL:feedURL
                              delegate:self
                     didFinishSelector:@selector(entryListFetchTicket:finishedWithFeed:error:)];


    [ticket setShouldFollowNextLinks:NO]

Can somebdoy give me a hand ?

Thanks

2

2 Answers

0
votes

Do you actually define a method entryListFetchTicket:finishedWithFeed: in your class that you are using as the delegate object?

0
votes

The callbacks for GData fetches have three parameters, not two. The first code snippet is missing the error: at the end of the selector.

Be sure to define DEBUG=1 for your debug builds; the library will catch such issues.