2014-03-06 104 views
1

我一直在iphone应用程序工作,并且自7.1版本发布以来,我无法编译64位设备的应用程序错误:无效的二进制表达式操作数('BOOL'(又名'signed char')和'void')

“无效操作数的二进制表示(‘BOOL’(又名‘符号字符’)和‘空’)”

问题是应用程序的早期版本使用谷歌Anaytics(分析)v2和,一个是不支持在新的iOS,但我跟着他们的SDK和他们的“迁移”手册到V3,但我不能让它工作,这是一个问题:

以前这是根据谷歌的手动工作

BOOL returnValue = YES; 
    if(tracking1) { 
     id tracker1 = [[GAI sharedInstance] trackerWithTrackingId:tracking1]; 
     [tracker1 setCustom:1 dimension:con]; 
     [tracker1 setCustom:2 dimension:mod]; 
     returnValue &= [tracker1 sendView:screen]; 
    } 
    if(tracking2) { 
     id tracker2 = [[GAI sharedInstance] trackerWithTrackingId:tracking2]; 
     [tracker2 setCustom:1 dimension:con]; 
     [tracker2 setCustom:2 dimension:mod]; 
     returnValue &= [tracker2 sendView:screen]; 
    } 
    return returnValue; 

代码,我改变了这个新的代码

BOOL returnValue = YES; 
    if(tracking1) { 
     id tracker1 = [[GAI sharedInstance] trackerWithTrackingId:tracking1]; 
     // Set the custom dimension value on the tracker using its index. 
     [tracker1 set:[GAIFields customDimensionForIndex:1] value:con]; 
     [tracker1 set:[GAIFields customDimensionForIndex:2] value:mod]; 
     [tracker1 set:kGAIScreenName value:screen]; 

     // Send the custom dimension value with a screen view. 
     // Note that the value only needs to be sent once, so it is set on the Map, 
     // not the tracker. 
     returnValue &= [tracker1 send:[[GAIDictionaryBuilder createAppView] build]]; 

    } 
    if(tracking2) { 
     id tracker2 = [[GAI sharedInstance] trackerWithTrackingId:tracking2]; 
     // Set the custom dimension value on the tracker using its index. 
     [tracker2 set:[GAIFields customDimensionForIndex:1] value:con]; 
     [tracker2 set:[GAIFields customDimensionForIndex:2] value:mod]; 
     [tracker2 set:kGAIScreenName value:screen]; 

     returnValue &= [tracker2 send:[[GAIDictionaryBuilder createAppView] build]]; 
    } 
    return returnValue; 

和我的returnValue & = [跟踪...]被突出显示,并显示我的错误我发布了。

+0

这是为什么标签C 2 –

+0

'send:'方法的返回类型是什么?它打赌它是'空'。 – rmaddy

+0

我不太确定,我正试图找出一个...... – zuboje

回答

1

sendGAITracker.h方法不返回任何东西:

/*! 
Queue tracking information with the given parameter values. 

@param parameters A map from parameter names to parameter values which will be 
set just for this piece of tracking information, or nil for none. 
*/ 
- (void)send:(NSDictionary *)parameters; 

只需卸下幽会returnValue &= ...

相关问题