kalnyc67 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Tracking fails on iOS 8 Widget #509

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Name of affected component: Mobile Tracking

Name of related library and version, if applicable (e.g. Android, iOS,
Snippets, etc.): GA SDK 3.09 on iOS 8.0.2

Issue summary: When adding GAI to a widget (formally, an iOS Extension for the 
Today View), no tracking appears to be done.

Steps to reproduce issue:
1. Add tracking code to a widget (i.e. setup the tracker, send an event or set 
a screen name)
2. Run the widget on-device.

Expected output:
Tracking to occur, i.e. the ability to see events from the widget in reports, 
see realtime reports.

Actual results:
Nothing appears to happen. There are no errors while compiling and no errors at 
run time, but there are no results reported back to GA. GA will report "idfa 
class missing, won't collect idfa", indicating that at least some of 
initialization is done.

Notes:
I tried initializing the tracker from both awakeFromNib and viewDidLoad. 
Normally, init of the tracker is done from the app delegate, but there isn't 
one in a widget.
I realize the OS tries to complete the widget's execution as quickly as 
possible, so I disabled periodic dispatching and dispatched manually, 
immediately after building an event.
The merits of tracking activity in a widget could be debated, as memory usage 
and cpu time are very constrained, but in my testing, the overhead seems very 
limited.

Original issue reported on code.google.com by rachidfi...@gmail.com on 8 Oct 2014 at 10:08

GoogleCodeExporter commented 9 years ago

Original comment by pfrise...@google.com on 10 Oct 2014 at 6:27

GoogleCodeExporter commented 9 years ago
I am having the same issue with the latest GA release too.

Original comment by sm.shari...@gmail.com on 11 Dec 2014 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by pfrise...@google.com on 23 Mar 2015 at 6:21