Can Game Center Track total time played? - ios

Curious to know if Game Center tracks total time played per app? If it does, how could I easily query this data?
Thanks!

No, you cannot use game center to do this. There are a couple of options though.
You can track it locally, and then upload the data to a game center leaderboard. I don't know if you want to do that though because then everyone can see how much a certain player has played
You can use some sort of analytics service, like Google Analytics and ping it periodically while a player is on the app so you can see how much people are playing
Or you can set up a server and database, where the player sends their play time when they are on the app

Related

Is it possible to issue an alert when a GameKit opponent is ready?

I made a game using GameKit and I am using the framework to manage a real-time match between two opponents. If I invite a specific person to a match, or make sure they are "waiting for opponent" at the same time as me, the match and game goes smoothly and everything is great.
The problem I have now is that there aren't a lot of people on my app yet, and so people that are wanting to play against a random opponent who also wants to play, don't have any way of knowing when a match could be ready.
Is there a way to utilize GameKit, but enhance the experience so that a push notification or alert of some kind is sent when an opponent is found? It could be this is all built in, but I'm not seeing anything.
AFAIK, GameKit does not support push-notifications for matching real-time games while your App isn't running.
But, GameKit has a Player Activity API that tells you how many matches were requested in the last 60 seconds, and you could use that number to create an informative message or status to show the player.
EDIT: the methods in question are
- queryActivityWithCompletionHandler:
- queryPlayerGroupActivity:withCompletionHandler:

iOS App for Live Concert Ideas

I want to make an App for concert. Basically this will serve a lights sync on the music played in the concert. The flashing of lights should be in sync in the beat or music at the concert.
Something like this:
https://itunes.apple.com/us/app/dan-deacon/id536378735?mt=8
Question is
Is the app listening to the music thru the microphone?
If it is listening, how does it know when to flash the lights based on the beat of the music or the music itself?
In the example app I posted it's not using any wifi or mobile data so does it mean that it's standalone and does #1 and #2?
I have this question coz I'm new to app development. I want to do those feature but my idea is that there is a server which we control that will just send the lights flashing pattern on those apps, my concern is that if there's were 100,000 people in the event, provided the all have a wifi connection, will the sending of flashing lights pattern be a problem espcially you are sending hundred thousands of commands at the same time? I would prefer it to be in offline mode but how till it exactly work?
That is an amazing app. You need to synchronize your apps to the musik and maybe the apps among them selfs.
I picked some links for you:
http://content.iospress.com/articles/journal-of-embedded-computing/jec00021
http://www.cse.wustl.edu/~cdgill/PDF/RTSS08.pdf
http://blog.trifork.com/2013/02/18/build-build-massively-scalable-soft-real-time-systems-with-erlang/
In praxis i can imagine that the user starts playing the song and the app synchonize by the recorded sounds...

Update in realtime

I want to create an app that will have real time update. It's kind of like a game. Here's what I'm trying to do:
Players will be playing, and as soon as someone gets the highest score, (while he's playing,) it should show it on all devices, and the score should be constantly changing as the high score user is playing.
I know that this is kind of difficult to understand, but I'm basically trying to get a leaderboard like agars game, where the names are constantly changing.
You can start with Angularjs and Firebase database. Firebase

CloudKit and GameCenter in a game?

I am working on a game. It will use Game Center for multiplayer. I would like to be able to use CloudKit for storing levels and the local CloudKit container for storing game progress. The problem is that this requires to different accounts. Any ideas on how to link them together?
I struggled with this recently when building in syncing to my game Qiktionary. At first I associated single player game data with the currently logged in Game Center player. So when I started working on sync, I was associating the single player game data in CloudKit with the Game Center player by using a separate CKRecordZone (in the private db) for each Game Center player.
I ended up abandoning that approach because it turns out that causes some behaviour that looks to the user like data loss. For example, GC Player A is logged into your game and plays 10 single player games (or in your case, levels). Later they happen to log out of Game Center, and even later than that they come back to your game and since they are logged out, they no longer see their 10 games played. It's not obvious that the game data is there but just "missing" because they are now logged out of GC.
I did some research and most other games don't work like that. Single player game progress is not linked to the logged in Game Center player. Which means that the single player game data in CloudKit shouldn't be linked to the Game Center player either.
This is even how the GKSavedGame API from GameKit works. According to the docs:
Saved games are tied to the iCloud account, not the Game Center account

Game Kit Send data to offline player

I am pretty sure i know the answer but is it possible to send data using game kit to a player who is not playing the game anymore so next time he loads the game the data will be there. Is there any sort of messaging queue in gamecenter that can hold data
Nope, this is not possible if you let Game Center host the game. But you can set up your own server which stores the data and hands it over to the client while still having Game Centers match making functionality.

Resources