{"id":13741083,"url":"https://github.com/kubkon/zig-ios-example","last_synced_at":"2025-03-17T09:30:30.893Z","repository":{"id":45405640,"uuid":"393344126","full_name":"kubkon/zig-ios-example","owner":"kubkon","description":"Minimal build.zig for targeting iOS","archived":false,"fork":false,"pushed_at":"2023-10-11T19:51:54.000Z","size":18,"stargazers_count":136,"open_issues_count":5,"forks_count":7,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-16T10:24:54.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubkon.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}},"created_at":"2021-08-06T10:37:09.000Z","updated_at":"2025-03-01T06:19:35.000Z","dependencies_parsed_at":"2024-01-27T09:39:06.231Z","dependency_job_id":"a720fbfa-86ae-4b34-89f0-9b01cc7ac218","html_url":"https://github.com/kubkon/zig-ios-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzig-ios-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzig-ios-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzig-ios-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzig-ios-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubkon","download_url":"https://codeload.github.com/kubkon/zig-ios-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244008878,"owners_count":20382926,"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":[],"created_at":"2024-08-03T04:00:55.266Z","updated_at":"2025-03-17T09:30:30.487Z","avatar_url":"https://github.com/kubkon.png","language":"Zig","funding_links":[],"categories":["Zig","Applications"],"sub_categories":[],"readme":"# zig-ios-example\n\nMinimal `build.zig` for targeting iOS with Zig toolchain.\n\n# Building\n\nFor iOS Simulator on Apple Silicon Mac:\n```\nzig build -Dtarget=aarch64-ios-simulator\n```\n\nFor iOS Simulator on Intel Mac:\n```\nzig build -Dtarget=x86_64-ios-simulator\n````\n\n\nIf you are building natively on macOS and have Apple SDKs installed for Apple platforms, the path\nto the SDK will be autodetected for you as part of the build script. You can still manually set the\npath to the SDK via `--sysroot` flag.\n\nIf you are cross-compiling from a different host such as Linux, or you don't have Apple SDKs installed\non macOS, you will need to provide the appropriate Apple SDK such as `iphoneos` if targeting hardware\ndevices or `iphonesimulator` if targeting the simulator. In this case, you will need to provide the path to\nthe SDK explicitly using the `--sysroot` flag.\n\nSetting the sysroot looks like this\n\n```\nzig build --sysroot \u003cpath_to_sdk\u003e -Dtarget=aarch64-ios-simulator\n```\n\n## Running in iPhone Simulator\n\nFire up the simulator, and then install the app with\n\n```\nxcrun simctl install booted zig-out/bin/MadeWithZig.app\n```\n\nYou can run the app with\n\n```\nxcrun simctl launch booted madewithzig\n```\n \n## WIP: running on an iPhone\n\nThis is more of a roadmap what I'd like the process to look like. For now, this only works for me \nlocally as I am in possession of Jakub's secret sauce! However, I am working hard on making both\n[`zignature`](https://github.com/kubkon/zignature) and [`zig-deploy`](https://github.com/kubkon/zig-deploy)\nmore complete and actually functional for others, so stay tuned for updates!\n\n```\nzig build -Dtarget=aarch64-ios.15.4...15.4\nzignature -s \u003cpath-to-cert\u003e --entitlement \u003cpath-to-entitlements.plist\u003e zig-out/bin/MadeWithZig.app\nzig-deploy -n \u003cname-of-your-device\u003e zig-out/bin/MadeWithZig.app\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubkon%2Fzig-ios-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubkon%2Fzig-ios-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubkon%2Fzig-ios-example/lists"}