Your friends iOS app

Anders Nyboe Jensen (andej13)


In this project I have made an iOS app , that center around play. The app is call “Challenge”, and is about you and your friend can play, and challenge to do small simple tasks like Jump x times in a time limit.

The idea of this app is to make kid move around and have fun, but moselig have fun.

This app take the advenavents of the accelerometer, in a given iPhone, and measure what perimeter it need to do the challenge.

Video link of the prototype: 

Idea Development


The first step was to understand the project limitation, which was that it shall be a iOS app  that for either a Health tech or a game (game that maybe also encourages play) app , and it need to use a internal or external sensor.

Then I try to visualize what sensor a iPhone. Accoloramert, camara, temperatur sensor, light sensor to name some of them.

When knowing what  sensore there are, then how can they be use.

Here I drawer out some ideas I could see, for a given sensor what it be use in.

After some more things and limit the difficulty of projekt, i went with going with the  Accoloramert. The Accoloramert detekt ex. jumps, is is a normal thing to do when playing.

When you have friends to play with, in this days they will normally have a phone, but I did not want to go into Online connection because that is normally very difficult.

So be Inspired by the game “Triple agent”, a game on android and iOS that is multiplayer but one phone. It does that by game itself take is step by step, and is the share betrian the group of friends.

Then I drawer out view of the app I wanted to make, which was a Challenge app. I made the view and then use the app “marvel app” and then made my low fidelity version.

I made one more that is more smother, by going on marvel website, and made one there.


link to my second low fidelity version:


Making the app

By having the design for my Low fidelity prototype, could I make the it to different views.

Then setting them up, a simple drag and slip for the button to which view the user shall go to next.

There are three view Controller in this project,viewController, jump_ viewController and
chal_ viewController, but the one that is most interesting for the concept is the jump_ viewController

In order to use the accelerometer there needed to be imported CoreMotion for using   CMMotionManager().

import CoreMotion
var motionManger = CMMotionManager()

Now we need a way to read the data.  We first need a UpdateInterval for control the data flow, and then we access the state of the accelerometer.

motionManger.accelerometerUpdateInterval = 0.2
motionManger.startAccelerometerUpdates(to: OperationQueue.current!){(data,error) in

we store the data stat in myData. By reading myData we can then say with X,Y or Z axes we want. For the projekt we are looking add the Y- axes, for up and down.

  if myData.acceleration.y <= -1.6 && jump == false
                    jump = true


If Y is lowe then -1.6 with is Up. then we are up in the air

if myData.acceleration.y > -1.4 && jump == true
                    jump = false
                    if gameON == true {
                        cont = cont + 1
                    self.num.text = "\(cont)"

If Y is then higher than  -1.4, we must be down again, and then we add 1 to the global variable cont


if the goal is made we right we change the Label bord_label to “WIN!”.

  if gameON == true{
                if goal == cont {
                    self.bord_label.text = "WIN!"
                    gameON = false


If the app have a working countdown will it display “Lost” if the goal was not yet met in time.




I made a simple proof of concept, that works okay.

This app is very simple, and could have been more interesting if  I put more time into it.

But because a lot of project this semester, I have hade put this project a little of to the side.

A lot more mode could have been implementer like using a gyroscope for spinning around.

It turn out that finding a  good sweet spot for the jump is hard      



I have made a simple prototype app call “Challenge”, that detector when you jump.

Ther have made low-fidelity prototype using paper, and the Marvel app.

By using the Y coordinate on the accelerometer,  can the app detect a jump.

Leave a Reply