2

AppDelegate.m

#import "GAI.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    // Optional: automatically send uncaught exceptions to Google Analytics.
    [GAI sharedInstance].trackUncaughtExceptions = YES;
    // Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
    [GAI sharedInstance].dispatchInterval = 20;
    // Optional: set debug to YES for extra debugging information.
    [GAI sharedInstance].debug = YES;
    // Create tracker instance.
    id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@"UA-42949960-2"];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];


    return YES;
}

视图控制器.h

#import "GAITrackedViewController.h"
@interface ViewController : GAITrackedViewController <UIActionSheetDelegate, NSURLConnectionDelegate,NSURLConnectionDataDelegate,NSURLConnectionDownloadDelegate,UIAlertViewDelegate>
{

}

视图控制器.m

#import "GAI.h"

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    self.trackedViewName = @"Home Screen";
}

我不明白出了什么问题,并按照标志谷歌这是需要做的。

4

0 回答 0