alexhajdu
alexhajdu

Reputation: 400

Analytics in iPhone game

I'm thinking about implementation of some simple analytics tool in my new game. I want to analyze for example, what scene is played at most, etc. (I've 6 scenes in my game) Is this possible, or it's against some Apple rules? And if it's possible, what's the best solution? What are my options?

Upvotes: 0

Views: 275

Answers (3)

Imirak
Imirak

Reputation: 1333

Of course this is possible, and it's definitely not against Apple rules. Google Analytics could be an option, but here is another:

So first, I would check which scene is actually visible by checking if each view controller's view is loaded

if (myViewController.isViewLoaded && myViewController.view.window) {

}

Then maybe start an NSTimer that triggers a method that adds one to a counter (separate ones for each view). Keep track of each counter, and whatever counter value corresponding to each view is the greatest, that view is being used the longest.

Upvotes: 0

skovalyov
skovalyov

Reputation: 2099

Maybe Google Analytics SDK for iOS can be an option? https://developers.google.com/analytics/devguides/collection/ios/

Upvotes: 1

Casey
Casey

Reputation: 2403

Yes, it is possible and not against any of Apple's rules. Google analytics has an SDK that is easy to use and will track anything you want in your app.

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

I've used it many times before and it works great.

Upvotes: 2

Related Questions