Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/97.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Gracenote错误:无效用户_Ios_Iphone_Objective C_Gracenote - Fatal编程技术网

Ios Gracenote错误:无效用户

Ios Gracenote错误:无效用户,ios,iphone,objective-c,gracenote,Ios,Iphone,Objective C,Gracenote,在iOS中实现Gracenote api时出现问题。提供的用户和管理器无效,未初始化 GN_Entourage_演示[24927:70b]getUserACR:错误:管理器未初始化2014-03-10 19:05:20.509 GN_Entourage_演示[24927:70b]错误:无效用户(lldb) 我在执行时遇到以下问题 //初始化Entourage SDK self.sdkManager=[[GnSdkManager alloc]initWithLicense:LICENSE_INFO

在iOS中实现Gracenote api时出现问题。提供的用户和管理器无效,未初始化

GN_Entourage_演示[24927:70b]getUserACR:错误:管理器未初始化2014-03-10 19:05:20.509 GN_Entourage_演示[24927:70b]错误:无效用户(lldb) 我在执行时遇到以下问题

//初始化Entourage SDK self.sdkManager=[[GnSdkManager alloc]initWithLicense:LICENSE_INFO error:nil]

self.acrUser = [self getUserACR];
if (!self.acrUser) {
    NSLog(@"Error: Invalid User");
}

// Create a GnAcr object for this user
self.acr = [[GnACR alloc] initWithUser:self.acrUser error:nil];

// Set up an audio configuration
GnAcrAudioConfig *config =
[[[GnAcrAudioConfig alloc] initWithAudioSourceType:GnAcrAudioSourceMic
                                        sampleRate:GnAcrAudioSampleRate44100
                                            format:GnAcrAudioSampleFormatPCM16
                                       numChannels:1] autorelease];

// Initialize the GnAcr's audio configuration
[self.acr audioInitWithAudioConfig:config];

// Initialize the audio source (i.e. device microphone)
self.audioSource = [[GnAudioSourceiOSMic alloc] initWithAudioConfig:config];

// Assign the delegates
self.audioSource.audioDelegate = self;
self.acr.resultDelegate = self;
self.acr.statusDelegate = self;

self.isListening = NO;

}

iOS代码在许可证信息文本中存在空格/换行符问题。您需要做的是将许可证字符串中的换行符替换为“\n”(不带引号),这样许可证信息就只有一行了。错误应该消失

我们已经用这个注释更新了文档


谢谢,给您带来不便,非常抱歉

这还不足以回答这个问题。请显示调用Gracenote API的代码。如果在方法中使用参数
error
,并查看它们的值,而不是将
设为nil
,会发生什么情况?我实际上使用了从Gracenote API下载的演示教程,因此使用时会遇到这个问题