Build an app for Ibadan Life
Every phone in the game has an app store: the App Store on an iPhone, the Play Store on Android, with the same apps in both. The apps in it are built by people who live here. This page is for code apps: one HTML file that runs inside the player's phone and can ask for their name, take a payment, and remember things.
Three ways to publish
- Build one in the phone: no code. A quiz, directory, poll, price list, tip jar or countdown, typed into a few boxes.
- Link to your site: something you built and host yourself. It opens outside the game.
- Upload code: the rest of this page.
First take the App developer job (it works from home and needs a laptop). Then open the phone's store and its second tab: Developer on an iPhone, Play Console on Android. Your first 3 publishes are free; after that each costs Ẹ20,000. You can have five apps in the store. Every app is read and tried by a person before it goes live, and again whenever you change its file, permissions or icon picture.
The file
- One HTML file, up to 200 KB, with its CSS in
<style>and its JavaScript in<script>. - No outside files: scripts, stylesheets, fonts and images from other addresses will not load. Put pictures in as
data:URLs. - It runs in a locked frame with no address of its own. It cannot read the game's cookies or storage, reach the network (no
fetch), submit forms, open windows or move the page. The only way out is the bridge below. - Design for a phone screen about 360 px wide. A strip above your app always shows its name and yours, and tells players never to type a password into an app.
The bridge
The phone adds ibadan to your page before your code runs. Every call returns a promise; a refusal rejects it with an Error whose message you can show. Declare what you need when you publish; a call you did not declare is refused. At most 20 calls in any 10 seconds.
ibadan.player()resolves with { name, area }
The player's username and the area they are in now (its short name, such as "bodija"). Needs "See your name and the area you are in". The phone asks the player once per app; if they say no, the promise rejects. They can take it back from the app's page.
ibadan.charge(amount, note)resolves with nothing
Asks the player to pay a whole number from 1 to Ẹ5,000. Needs "Ask you to pay (you confirm every time)". The phone shows its own sheet with your app's name, your username, the amount and your note (up to 80 characters) every time; your button can never move money by itself. It resolves once paid and rejects if they decline, can't pay, or your app has charged them Ẹ20,000 in the last 24 hours. You get 70%.
ibadan.storage.get(key)resolves with string or null
Reads a value you saved for this player. Needs "Keep a little of its own data for you" (no sheet: it is your app's own notes, listed on its page).
ibadan.storage.set(key, value)resolves with nothing
Saves a string for this player. Keys up to 40 characters, values up to 2,000, and 20 keys per player. A full shelf still updates keys it already has.
ibadan.toast(text)resolves with nothing
A short message over your app for 3 seconds (up to 120 characters).
ibadan.close()resolves with nothing
Closes your app and returns the player to their phone.
A starter to copy
The same file sits behind "Use the starter" in the upload form. Declare "See your name and the area you are in" and "Ask you to pay (you confirm every time)" for it to work.
<!doctype html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>body{font:16px system-ui;margin:16px;color:#f3e9d7;background:#1b2430}button{font:inherit;padding:10px 14px;border-radius:12px;border:0;background:#9fe0b8}</style>
<h2 id="hi">Hello</h2>
<button id="buy">Buy pure water (50)</button>
<script>
// ibadan.* is added by the phone. Every call returns a promise.
ibadan.player().then(function (p) { document.getElementById("hi").textContent = "Hello " + p.name + " in " + p.area; }).catch(function () {});
document.getElementById("buy").onclick = function () {
ibadan.charge(50, "Pure water").then(function () { ibadan.toast("Paid. Cold one coming."); }).catch(function (e) { ibadan.toast(e.message); });
};
</script>To try it before review, open it from your own page in the store: a developer can run their own app while it waits. You can't pay yourself, so test a charge with a friend once it is live.
Getting into the store, and staying there
- Say what the app does honestly in its one line. Pick a category (Games, Food, Money, Getting around, Music and fun, News and gist, Tools, Other) and, if you like, an icon picture (square, it is shrunk to 128 px).
- An app that pretends to be the game, asks for a password, hides what a payment is for, or runs heavy work in the background is turned down or taken down.
- Players rate the apps they install and can report them. 3 reports from different players hide an app until an admin has looked.
- Every app of yours approved in a week is a ticket in Monday's developers' lottery (Ẹ50,000 plus a share of the week's publish fees, up to 3 tickets each).
- Each week there are four awards: most installed, top earner, best new app and players' choice, each worth Ẹ20,000. Winners are announced on the street, in the Gist and on X.