English 中文(简体)
页: 1 页: 1
原标题:iOS Google Analytics crash at start up, randomly

I’m encountering a random Google Analytics crash issue. This issue happens when my App starts and trying to initial GANTracker. It happens randomly, very hard to reproduce. I wonder if there is anything I missed or I should avoid in implementing GA initial.

这里是我的GANTracker首部法典:

#define GAKey @“UA-xxxxxx-x"

static const NSInteger kGANDispatchPeriodSec = 10;
[[GANTracker sharedTracker] startTrackerWithAccountID:GAKey
                                       dispatchPeriod:kGANDispatchPeriodSec
                                             delegate:nil];

虽然我开始这样做,但我的法典正在使用这一方法在另一个二级校对进行一些同步网络活动。

[NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]

这里是坠毁的标志,希望它有助于

-[GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:]
-[GANPersistentEventStore init]
-[GANPersistentEventStore initWithPath:]
-[GANPersistentEventStore setupStatements]
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
+[NSException raise:format:arguments:]

任何建议都会受到赞赏。

问题回答

UPDATE: According to Google s issues DB, this is allegedly fixed in v1.4 of GANTracker: http://code.google.com/p/analytics-issues/issues/detail?id=162 http://code.google.com/mobile/analytics/download.html


I m 开始在GANTracker起步时发生同样的坠毁事件,其中一起错误是:

NSInternalInconsistencyException: Error: Failed to prepare select session statement NSInternalInconsistencyException: Error: Failed to prepare update timestamp statement

追索权(不同于被占领土)的方法:

- [GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:]
- [GANPersistentEventStore init]
- [GANPersistentEventStore initWithPath:]
- [GANPersistentEventStore initializeSession]
- [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]

它在制作Googleanalytics.sql案时,在3_prepare_v2时,视而不见。

This is recurring for some of my users on IOS4.3.3 and also occurs randomly for IOS4.2.1 I have the same dispatch period as the OP. cannot repro this on my own simulator/device.

我希望,Gaogle analytics将释放其来源代码,以便在 s立案或准备声明失败时添加一些错误处理。

The s post on the GA Forum here with same mis:

this could be the same issue using sqlite3_prepare_v2 : http://www.iphonedevsdk.com/forum/iphone-sdk-development/2540-sqlite-method-sqlite3_prepare_v2-failing.html





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签