Google Analytics (iOS SDK) without SSL

2019-09-02 05:07发布

I'm using the latest SDK of Google Analytics for iOS and I'm facing a problem when I communicate with GA's server. For different reasons, I need my iOS device (ios7.1) to be configured with a date in the year 2000. Unfortunately, when the GA's SDK try to send the events tracked, the GA's server refuse them for a SSL problem (it seems that the GA's certificates are renewed each 3 months...)

Is there a way to force the GA's SDK to use HTTP or to fake the date sent ?

Thanks all.

1条回答
放荡不羁爱自由
2楼-- · 2019-09-02 06:00

To disable the use of https, add the following to your code after getting a tracker:

// Send hits using HTTP (default=HTTPS).
[tracker set:kGAIUseSecure value:[@NO stringValue]];

See item 5 here: https://developers.google.com/analytics/devguides/collection/ios/v3/migration

查看更多
登录 后发表回答