2014-03-06 103 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 &= ...

相關問題