2013-08-28 49 views
0

GAIDictionaryBuilder set forKey:GAISessionControl error reads:value for key的值表示它不符合代碼。Google Analytics API v3未知錯誤。 createEventWithCategory:not compiling

GAIDictionaryBuilder *dictionary = [GAIDictionaryBuilder createEventWithCategory:@"UX" action:@"App started" label:nil value:nil]; 
[dictionary setValue:@"start" forKey:kGAISessionControl]; 
[[GAI sharedInstance].defaultTracker send:dictionary.build]; 

我直接從他們的網站谷歌之後的文檔,&仍然不知道那裏的錯誤是哪裏來的? https://developers.google.com/analytics/devguides/collection/ios/v3/migration#setting-data

回答

0

Google Analytics(分析)文檔存在錯誤(與往常一樣)。我被替換 「的setValue:」 擺脫了錯誤的用 「載:」 從

: [字典的setValue:@ 「開始」 forKey:kGAISessionControl]。

去: [字典集:@「開始」forKey:kGAISessionControl];

現在完美運作。

GAIDictionaryBuilder *dictionary = [GAIDictionaryBuilder createEventWithCategory:@"UX" action:@"App started" label:nil value:nil]; 
[dictionary setValue:@"start" forKey:kGAISessionControl]; 
[[GAI sharedInstance].defaultTracker send:dictionary.build]; 
相關問題