therealjohn/GoogleAnalytics

Cannot implement GAITrackedViewController

Closed this issue · 4 comments

Cannot implement GAITrackedViewController, e.g.

class MyClassController : GAITrackedViewController
{

}

Section 3 in the following link describes this functionality. This implementation provides the ability to track screen views without having to manually add code that calls the track() method:

https://developers.google.com/analytics/devguides/collection/ios/v3/)

What type of issue does it cause? Do you see an error message?

You have to set the screenName selector in order for it to work. I suppose you didn't expose that property in GAITrackedViewController?

2013-10-10 09:52:00.255 TemplateiOS[8614:60b] -[CategoryViewController screenName]: unrecognized selector sent to instance 0x177d1110
2013-10-10 09:52:05.261 TemplateiOS[8614:60b] WARNING: GoogleAnalytics 3.01 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:49): Uncaught exception: -[CategoryViewController screenName]: unrecognized selector sent to instance 0x177d1110

On Oct 10, 2013, at 9:47 AM, therealjohn notifications@github.com wrote:

What type of issue does it cause? Do you see an error message?


Reply to this email directly or view it on GitHub.

I just tested this and it works fine. Here is how you implement it:

    public class TrackedController : GAITrackedViewController
    {
        public TrackedController()
        {

        }

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            ScreenName = "TrackedController";
        }
    }

Try it, and let me know if you still have issues.

mnjk commented

Hi,

i have replaced old google analytics by new version 3.07
"libGoogleAnalyticsServices.a" and class files.

i have "libGoogleAnalyticsServices.a" file inside my project folder and it is linked in Framework folder also.

On settingPage > Search path itself i have chaneged $(BUILT_PRODUCTS_DIR) and $(PROJECT_DIR) in Xcode

once i run my xcode it give me linker error as link.

No such directory

/Users/Kareems/Library/Developer/Xcode/DerivedData/EventAheadModel-bfbulwwdciidebbukoyafttnkhil/Build/Products/Debug-iphoneos/libGoogleAnalyticsServices.a