{"id":15366768,"url":"https://github.com/erkkah/timogrios","last_synced_at":"2025-04-15T12:31:21.057Z","repository":{"id":84184568,"uuid":"411554346","full_name":"erkkah/timogrios","owner":"erkkah","description":"TIny MObile GRaphics starter. Create tiny iOS apps based on the TIGR library.","archived":false,"fork":false,"pushed_at":"2021-10-03T19:36:05.000Z","size":409,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T20:12:05.610Z","etag":null,"topics":["2d-graphics","ios","mobile-game","tigr","tiny"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erkkah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-29T06:22:11.000Z","updated_at":"2024-08-27T18:49:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"211f9d47-579b-452b-8ffd-caac2663a280","html_url":"https://github.com/erkkah/timogrios","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"8c1fa2ca2794ceee96a81ab3bba96822a94af40b"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkkah%2Ftimogrios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkkah%2Ftimogrios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkkah%2Ftimogrios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkkah%2Ftimogrios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erkkah","download_url":"https://codeload.github.com/erkkah/timogrios/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072175,"owners_count":21208129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-graphics","ios","mobile-game","tigr","tiny"],"created_at":"2024-10-01T13:19:47.661Z","updated_at":"2025-04-15T12:31:21.035Z","avatar_url":"https://github.com/erkkah.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TIMOGRiOS - TIny MObile GRaphics starter template for iOS\n\n![](resources/timogrios-small.png)\n\n**TIMOGRiOS** is a tiny iOS starter template for creating fullscreen 2D apps using the\n[TIGR](https://github.com/erkkah/tigr) library.\n\nLike TIGR, TIMOGRiOS is designed to be small and mostly independent.\nThe \"hello world\" app bundle is less than 350k.\n\nTIMOGRiOS takes away a lot of the hassle of working with iOS apps and makes\nthe complete development cycle super fast.\n\nOh, and you don't even have to open up Xcode to compile, debug and sign your apps!\n\n## Prerequisites :shopping:\n\n*To just run on a Simulator:*\n\n* A Mac with Xcode installed\n\n*To build apps for running on a device:*\n\n* An Apple developer account\n* [AppStoreConnect CLI](https://github.com/ittybittyapps/appstoreconnect-cli) installed and configured\n    * Follow the instructions to create and install an AppStore Connect API Key\n* The [ios deploy](https://github.com/ios-control/ios-deploy) tool installed\n\n Making image sets (see [Adding resources](#adding-resources) below) requires ImageMagick `convert` installed.\n\n## Getting started :car:\n\n* [Generate](https://github.com/erkkah/timogrios/generate) your own repo based on this template\n* Clone your new repo to get the files to your machine\n\n### A test run\n\nWithout any iDevice connected, run `./launch.sh`.\n\nThis should open a Simulator, build and launch the demo app.\n\nIf it launches, continue to the next step.\n\n\u003e *Don't worry if the app runs slowly in the Simulator.*\n\n### Basics\n\n**First**, you need to update the `Info.plist` file.\nAt least you should update `CFBundleIdentifier`, `CFBundleName` and `CFBundleDisplayName`.\n\n\u003e Pick a unique Bundle ID (`CFBundleIdentifier`) in reverse domain style,\nlike `com.example.myapp`, but obviously not exactly that.\n\n**Now** you are all set to make another test build for the Simulator.\n\nIf you have any iDevice connected, disconnect it and run `./launch.sh`.\n\nThis should open a Simulator unless already running, build and launch the app with the configured display name.\n\n\u003e NOTE: TIGR uses OpenGL with some basic shaders, which will probably be software rendered on your simulator, making the app run slowly.\n    *You will need to run on device to do any serious development work.*\n\n### Run on device :iphone:\n\nTo be able to run on device, you need:\n\n* a signing certificate for development\n* a registered app identifier (bundle ID), and\n* a development provisioning profile for your bundle ID.\n\nYou can set up all three on your [developer account](https://developer.apple.com/account) pages,\nOR, you can **do it all from the comfort of your terminal**:\n\n* Copy `settings.example` to `settings.env`\n* Update the `APPSTORE_CONNECT_ISSUER_ID` and `APPSTORE_CONNECT_API_KEY_ID` settings in `settings.env`\n    to provide access to the App Store API.\n* Run `./makecert.sh development` to generate a signing certificate and import it\n    into the keychain to make it available for code signing.\n    * *If you already have a signing certificate, you don't need to create a new one!*\n* Run `./registerid.sh` to register the bundle ID using the values from `Info.plist`.\n* Run `./makeprofile.sh development` to create a development provisioning profile.\n\nMake sure to update the `SIGNING_IDENTITY` and `PROVISIONING_PROFILE_ID` settings in `settings.env`.\n\nConnect and unlock an iDevice and run `./launch.sh` again.\n\nNow the app should run at full speed on your device.\n\n### Start building :construction:\n\nReplace the meat of `src/main.c` with your TIGR code, and you're done.\n\nJust like with desktop TIGR, the code can be as tiny as this:\n\n```C\n#include \"tigr.h\"\n\nvoid tigrMain()\n{\n    Tigr *screen = tigrWindow(320, 240, \"Hello\", TIGR_4X);\n    while (!tigrClosed(screen))\n    {\n        tigrClear(screen, tigrRGB(0x80, 0x90, 0xa0));\n        tigrPrint(screen, tfont, 120, 110, tigrRGB(0xff, 0xff, 0xff), \"Hello, world.\");\n        tigrUpdate(screen);\n    }\n    tigrFree(screen);\n}\n```\n\n## Adding resources\n\nAll files in the `resources` directory are included as is in the app bundle.\nThe `Icon` - files are icons in different sizes, and the `Launch` - files\nare launch images.\n\nUse the `makeimageset.sh` script to create new icons or launch images.\n\nFor example:\n```shell\n$ cd resources\n$ ../makeimageset.sh screen Launch pink\n```\n\nThe \"color\" argument can be specified in [any format accepted by ImageMagick](https://imagemagick.org/script/color.php).\nYou can specify an image file instead of the color, which makes sense for icons.\n\n### Files and assets in TIGR\n\nReading files by using `tigrLoadImage` for example, reads from the corresponding bundle path. Putting `image.png` at `resources/images/image.png` will make it loadable from `/images/image.png`.\n\nWriting files (`tigrSaveImage`) will write to the given system path. TIGR will not redirect writes to the app internal storage.\n\n## Some details and pointers\n\n### Input\n* Since most iDevices are not used with physical keyboards, there is currently no keyboard support.\n* The \"buttons\" reported by `tigrMouse` is the number of detected touch points, the position is always of the last triggered touch point.\n* Use `tigrTouch` to process multi-touch input.\n\n### Threads and extending the iOS side\nThe `tigrMain` entry point runs on a rendering thread separate from the main iOS thread.\n\nIf you need to do more iOS specifics, you can \"inherit\" from `TigrAppDelegate` by using\nan object proxy. Check out `custom_main.m` for an example.\n\n### C/C++\nYou can of course replace main.c with main.cpp if you want. Just update the `Makefile` and declare `tigrMain` as `extern \"C\"`:\n\n```C++\nextern \"C\" void tigrMain() {\n    // ...\n}\n```\n\n## Debugging\n\nTIMOGRiOS comes with a **complete debug setup** for VS Code with two configurations: \"Debug on device\" and \"Debug in simulator\".\nSimply switch to the \"run and debug\" panel (⇧ ⌘ D), select the configuration and press \"run\" (▶ / F5).\n\nYou can also run `./launch.sh debug` to launch the app in the LLDB commandline debugger.\n\n\u003e NOTE: On the simulator, the debugger breaks on launch and you need to \"continue\".\n\n## Building for App Store / TestFlight\n\nTBD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferkkah%2Ftimogrios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferkkah%2Ftimogrios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferkkah%2Ftimogrios/lists"}