0

Currently, in my AppDelegate, I have an instance variable declared for GNConfig that is set up with all properties I would like to receive.

This instance of GNconfig is used by any class that makes a gracenote request.

The requests I am using are recognition from an audio stream, recognition by local file and a text search which populates an array. The array is then used for track lookups by id for the corresponding array item.

I am able to get all the content I need, except for track and album link data (always returns null).

I have tried plenty of different suggestions and guides with no luck.

Could somebody please help me out? This data is essential to my app and my app is pretty much complete except for this big obstacle.

Thanks in advance.

** edit **

This is in my appDelegate:

_gnConfig = [GNConfig init:@"XXXXXXX-XXXXXXXXXXXXXXXXXXXXXXX"];
[_gnConfig setProperty:@"content.coverArt" value:@"1"];
[_gnConfig setProperty:@"content.coverArt.sizePreference" value:@"LARGE"];
[_gnConfig setProperty:@"content.allowFullResponse" value:@"1"];

I have this in one of my class methods:

NSURL *filePath = [item valueForProperty:MPMediaItemPropertyAssetURL];
[GNOperations recognizeMIDFileFromFile:self config:[[AppDelegate sharedDelegate] gnConfig] fileUrl:filePath];

In the delegate method I have:

gracenoteResponseItem = [result bestResponse];
NSLog("%@", [gracenoteResponseItem trackLinkData]);

2 Answers2

1

Some tracks may not have link data available. Also if you are doing a local lookup then you will have to set this config option:

[publicProperties setObject:@“1"forKey:@"content.allowfullresponse"];

  • I have tried this. Every single response I get has no link data. _gnConfig = [GNConfig init:@"XXXXXXXX-XXXXXXXXXXXXXXXXXXX"]; [_gnConfig setProperty:@"content.coverArt" value:@"1"]; [_gnConfig setProperty:@"content.musicId.queryPreference.singleBestMatch" value:@"1"]; [_gnConfig setProperty:@"content.contributor.images" value:@"1"]; [_gnConfig setProperty:@"content.coverArt.sizePreference" value:@"MEDIUM"]; [_gnConfig setProperty:@"content.allowfullresponse" value:@"1"]; NSLog: Link Data: (null) – Kevin Fernandes Jan 22 '14 at 22:14
  • Can you please confirm whether you obtained your client ID from ODP (Open Developer Portal)? – MobileSDKUser Jan 24 '14 at 20:22
  • By the Open Developer Portal, do you mean the Gracenote Developer Portal? If so, then yes. @MobileSDKUser – Kevin Fernandes Jan 25 '14 at 23:40
  • Could you help me out with this? – Kevin Fernandes Feb 12 '14 at 20:49
  • Any other suggestions? @MobileSDKUser – Kevin Fernandes Feb 19 '14 at 13:15
1

Unless you have explicitly had your client ID entitled for Link IDs (aka 'external' or '3rd party' IDs), you won't get any in your responses.

By default, Gracenote Open Developer client IDs aren't entitled for any external IDs. You need to coordinate with Gracenote to entitle your client ID to start receiving the desired IDs.

jmctodo
  • 186
  • 4
  • Thanks! I don't know why they wouldn't have told me this when they were checking on the problem. I haven't gotten any replies to email from the Gracenote support team for over a week. Hopefully they respond and help me out with this. @jmctodo – Kevin Fernandes Feb 27 '14 at 23:17