Google Analytics (iOS SDK) without SSL

别说谁变了你拦得住时间么 提交于 2019-12-13 04:32:39

问题


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:


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



来源:https://stackoverflow.com/questions/22692877/google-analytics-ios-sdk-without-ssl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!