- Logos 35%
- Objective-C++ 33.9%
- Objective-C 23.9%
- Makefile 3.2%
- Shell 2.4%
- Other 1.6%
| Box2D | ||
| layout/DEBIAN | ||
| Library | ||
| PreferenceBundle | ||
| theos@8fdef7e8f5 | ||
| Tweak | ||
| .gitignore | ||
| .gitmodules | ||
| get_libraries.sh | ||
| Makefile | ||
| README.md | ||
Graviboard
This tweak brings gravity to the homescreen icons!
Graviboard is split into a number of parts:
- Box2D - compiles the Box2D physics engine into a package that can be installed on the device.
- Library - integrates Box2D with Apple's UIKit in a generic way.
- Tweak - integrates the library into Apple's app launcher (SpringBoard) to add the icons to a physics simulation.
- PreferenceBundle - allows the user to configure Graviboard from the Settings application.
The main class in the library that handles the simulation is GVPhysicsController. This class is responsible for:
- Creating the physics world
- Inputting information about the given
UIViews into the physics world. - Measuring the acceleration due to gravity on the device and updating the physics world with this value.
- Measuring the user acceleration on the device and applying a corresponding force to every object in the world.
- Taking touch input and transforming it into hinge joints that are placed the physics world.
- Updating the positions of the displayed
UIViews at 60Hz, in sync with the framerate.
Getting Started
Prequisites
- Xcode 5 or later
- A jailbroken device running iOS 6 or later
Building
The first step to build the project is to clone the repository and initialize all of its submodules:
git clone git://github.com/conradev/Graviboard.git
cd Graviboard
git submodule update --init --recursive
Then we need to build libbox2d and install it on the device
cd Box2D
make package install
Then we need to install Graviboard's dependencies into theos:
cd ..
brew install xz
./get_libraries.sh
Finally, to build the project, you need only run:
make
Installing
To install this on a jailbroken device, some additional tools are needed.
The first tool is ldid, which is used for fakesigning binaries. Ryan Petrich has a build on his Github mirror:
curl -O http://cloud.github.com/downloads/rpetrich/ldid/ldid.zip
unzip ldid.zip
mv ldid theos/bin/
rm ldid.zip
To build a Debian package, dpkg is required. You can install it from Homebrew:
brew install dpkg
To build a package in the project directory, you can run:
make package
and to automatically install this package on your jailbroken device (over SSH), you can run:
make package install THEOS_DEVICE_IP=xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is the IP address of your device.
License
Graviboard is not available under any license for distribution.