O Google Analytics não funciona com o Swift 1.2 e o Xcode 6.3 [duplicado]
Esta pergunta já tem uma resposta aqui:
Problema com o Google Analytics no Swift 2 ou 3 6 respostasEu tentei usarGoogle Analytics com meu aplicativo Swift 1.2 usando o Xcode 6.3beta.
Meu cabeçalho de ponte funciona bem e contém:
#import "GAI.h"
#import "GAIDictionaryBuilder.h"
#import "GAIEcommerceFields.h"
#import "GAIEcommerceProduct.h"
#import "GAIEcommerceProductAction.h"
#import "GAIEcommercePromotion.h"
#import "GAIFields.h"
#import "GAILogger.h"
#import "GAITrackedViewController.h"
#import "GAITracker.h"
Tentei o seguinte código Swift para rastrear uma página:
var tracker2:GAITracker = GAI.sharedInstance().defaultTracker as GAITracker
tracker2.set(kGAIScreenName, value:"Home Screen")
tracker2.send(GAIDictionaryBuilder.createScreenView().build())
Mas a última linha acima gera o seguinte erro:
Cannot invoke 'send' with an argument list of type '(NSMutableDictionary!)'
Encontrei perguntas semelhantes como:O Google Analytics não inicializa no Swift, Usando o Google Analytics com Swift no iOS
O que preciso alterar para que o código acima funcione com o Swift 1.2?