{"id":13992447,"url":"https://github.com/biscuitehh/MarzipanPlatter","last_synced_at":"2025-07-22T15:32:36.287Z","repository":{"id":75347607,"uuid":"136422526","full_name":"biscuitehh/MarzipanPlatter","owner":"biscuitehh","description":"UIKit + macOS","archived":false,"fork":false,"pushed_at":"2018-06-14T14:10:39.000Z","size":14475,"stargazers_count":349,"open_issues_count":7,"forks_count":13,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-08-10T14:10:32.775Z","etag":null,"topics":["macos","reverse-engineering","swift","uikit","wwdc18"],"latest_commit_sha":null,"homepage":"","language":"Objective-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/biscuitehh.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":"2018-06-07T04:39:29.000Z","updated_at":"2024-04-22T13:39:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe19cebb-1356-400b-b003-45234dc58036","html_url":"https://github.com/biscuitehh/MarzipanPlatter","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/biscuitehh%2FMarzipanPlatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biscuitehh%2FMarzipanPlatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biscuitehh%2FMarzipanPlatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biscuitehh%2FMarzipanPlatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biscuitehh","download_url":"https://codeload.github.com/biscuitehh/MarzipanPlatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227133819,"owners_count":17735809,"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":["macos","reverse-engineering","swift","uikit","wwdc18"],"created_at":"2024-08-09T14:01:59.635Z","updated_at":"2024-11-29T13:30:40.570Z","avatar_url":"https://github.com/biscuitehh.png","language":"Objective-C","funding_links":[],"categories":["Objective-C"],"sub_categories":[],"readme":"# Marzipan Platter\n## tl;dr\n![Gifs are all the rage in Paris](https://github.com/biscuitehh/MarzipanPlatter/raw/master/assets/demo1.gif)\n\n## Overview\nAt WWDC 2018 Apple announced that they are working on a multi-year strategy to make it easier to port UIKit applications to the Mac. While some first-party applications such as the Home \u0026 News app are going to use this API in macOS 10.14, third-party developers won't have _official_ access for another year. As a result, I made this project to help tinkerers/other impatient people get a taste of what's to come when Apple gives everyone access to Marzipan next year.\n\n## Requirements/Notes\n- macOS 10.14 Mojave \u0026 Xcode 10 (note: apparently Virtual Machines *do not* work with Marzipan, so you'll need a real Mac/Hackintosh to make magic happen)\n- Disabling SIP \u0026 adding the `amfi_get_out_of_my_way=0x1` to your `boot-args` (Hopefully we can circumvent the entitlement check with a less brutish method in the near future)\n- Requires [jtool](http://www.newosxbook.com/tools/jtool.html) to parse the MachO loader commands.\n- Requires [optool](https://github.com/alexzielenski/optool) to edit the MachO header of our _almost_ final product.\n- Patience\n- No longer requires any environment variables because the best rules are no rules.\n- Still probably requires a beer or two.\n\n## Caveats\n- Requires you to disable SIP \u0026 add `amfi_get_out_of_my_way=0x1` to your `boot-args`. There has to be a better way.\n- Seems to crash my debugger/Mac a lot (not sure if this is a me or a Mojave beta issue)\n- The `UIKitSystem` process doesn't usually stop running when you stop debugging your app. It's best if you leave `sshd` open (I mean we already killed code signing, what's the worst that could happen) and connected so you can kill `UIKitSystem` if your development machine locks up. Thanks goes to [@stroughtonsmith](https://twitter.com/stroughtonsmith) and [@_inside](https://twitter.com/_inside) for the gnarly tip!\n\n## Build instructions\n- Install Xcode 10, go to Preferences -\u003e Locations -\u003e select Xcode 10 for Command Line Tools\n- Disable SIP and AMFI:\n  - boot into Recovery Mode (hold Cmd+R while rebooting), open Terminal from menu bar\n  - `csrutil disable`\n  - `nvram boot-args=\"amfi_get_out_of_my_way=0x1\"`\n- Get jtool and optool:\n  - [Download jtool binary](http://www.newosxbook.com/tools/jtool.tar)\n  - `git clone --recurse-submodules https://github.com/alexzielenski/optool.git`\n  - open `optool/optool.xcodeproj`, hit Build\n- Configure Xcode project\n  - Open `MarzipanPlatter/MarzipanPlatter.xcodeproj`, go to MarzipanPlatter in sidebar -\u003e MarzipanPlatter target -\u003e General\n  - Change Signing -\u003e Team to your team, let Xcode regenerate provisioning profiles\n  - Go to Build Settings tab, and set the `JTOOL_PATH` and `OPTOOL_PATH` user-defined settings to the respective locations where you installed `jtool`/`optool`\n  - Also, you can set the `IOSMAC_PLATFORM_NAME` user-definied setting to either `iosmac` or `macos`. `iosmac` will use the linking magic to create an `iOSMac` binary and `macos` will create a patched `macOS` binary that requires the `CFMZEnabled=1` environment variable to be set before launching the app. However, you can also link things like `AppKit` with a `macOS` binary.\n - Hit Run (or use the CLI method below)\n\n## Build Release \u0026 Run (from the CLI)\nIf you're running into _oh my goodness my Mac keeps dying_ issues when debugging, I've provided some simple instructions to create a release version of your Marzipan app.\n\nTo build the archive: \n`xcodebuild archive -scheme MarzipanPlatter -archivePath ./build/MarzipanPlatter.xcarchive`\n\nTo export the `.app` from the archive: \n`xcodebuild -exportArchive -archivePath ./build/MarzipanPlatter.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath ./build/`\n\nTo run `MarzipanPlatter` with the useful `CFMZEnabled` environment variable:\n`./build/MarzipanPlatter.app/Contents/MacOS/MarzipanPlatter`\n\nOr just use this one-liner:\n```\nxcodebuild archive -scheme MarzipanPlatter -archivePath ./build/MarzipanPlatter.xcarchive \u0026\u0026 xcodebuild -exportArchive -archivePath ./build/MarzipanPlatter.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath ./build/ \u0026\u0026 ./build/MarzipanPlatter.app/Contents/MacOS/MarzipanPlatter\n```\n\n## TODO\n- [ ] find a better way to run Marzipan apps without disabling important things like AMFI/SIP.\n- [ ] continue adding samples to make this project sizzle.\n- [ ] find a better way to debug Marzipan apps that doesn't involve rebooting my Mac every 30 minutes.\n- [ ] write up an explaination of why you have to disable SIP/AMFI\n- [ ] fix these TODOs\n\n## Thanks\n- A big shout out to [@stroughtonsmith](https://twitter.com/stroughtonsmith) for sanity checking my approach to this problem/figuring out why UILabel decided to derp.\n- [@s1guza](https://twitter.com/s1guza) for [tbdump](https://github.com/Siguza/tbdump)\n- [@zhuowei](https://twitter.com/zhuowei) for coming up with the clever `ldwrap` method. Definitely check out the MarzipanTool repo listed below.\n- [@Morpheus______](https://twitter.com/Morpheus______) for the awesome `jtool` and `*OS Internals` books that have taught me many things.\n\n## Related Projects\n- [MarzipanTool](https://github.com/zhuowei/MarzipanTool) - Tools to build and run iOS UIKit applications on macOS 10.14 Mojave, using the iOSMac framework announced at WWDC.\n\n## Questions/Comments\nIt's probably best if you leave an issue if you have a real problem with this code. However, you can tweet/DM me [@NSBiscuit](https://twitter.com/NSBiscuit) on Twitter if you want to chat about life/snakes/random thoughts/etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiscuitehh%2FMarzipanPlatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiscuitehh%2FMarzipanPlatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiscuitehh%2FMarzipanPlatter/lists"}