{"id":15030941,"url":"https://github.com/madsmtm/ruffle-ios","last_synced_at":"2025-06-23T09:34:06.089Z","repository":{"id":257437702,"uuid":"858248751","full_name":"madsmtm/ruffle-ios","owner":"madsmtm","description":"Ruffle Flash Player emulator on iOS","archived":false,"fork":false,"pushed_at":"2025-02-08T09:54:09.000Z","size":623,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T22:45:20.988Z","etag":null,"topics":["emulator","flash","ios","objc2","ruffle","rust","rust-lang","swf","uikit"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madsmtm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-09-16T15:11:10.000Z","updated_at":"2025-03-03T21:41:51.000Z","dependencies_parsed_at":"2024-10-12T14:01:14.112Z","dependency_job_id":"838a9d8e-1aaf-4b0a-92f4-4dff5e6a50bf","html_url":"https://github.com/madsmtm/ruffle-ios","commit_stats":null,"previous_names":["madsmtm/ruffle-ios"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/madsmtm/ruffle-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madsmtm%2Fruffle-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madsmtm%2Fruffle-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madsmtm%2Fruffle-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madsmtm%2Fruffle-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madsmtm","download_url":"https://codeload.github.com/madsmtm/ruffle-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madsmtm%2Fruffle-ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261453150,"owners_count":23160455,"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":["emulator","flash","ios","objc2","ruffle","rust","rust-lang","swf","uikit"],"created_at":"2024-09-24T20:14:34.955Z","updated_at":"2025-06-23T09:34:01.078Z","avatar_url":"https://github.com/madsmtm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Ruffle Flash Player emulator on iOS\n\nWork in progress.\n\nSee [ruffle.rs](https://ruffle.rs/) for a general introduction.\n\n\n## Design choices\n\nA normal person might have wrapped the Rust in some `extern \"C\" fn`s, and then used SwiftUI, or at least Objective-C for the UI shell. I would probably recommend that for most use-cases.\n\nI'm developing [`objc2`](https://github.com/madsmtm/objc2) though, and I want to improve the user-interface of that, so I decided to be a bit unortodox, and do everything in Rust.\n\n## Testing\n\nRun the core player on Mac Catalyst with:\n```\ncargo bundle --target=aarch64-apple-ios-macabi --bin run_swf \u0026\u0026 ./target/aarch64-apple-ios-macabi/debug/bundle/ios/Ruffle.app/run_swf\n```\n\nThe proper application can also be launched from the iOS Simulator by opening [the Xcode project](./ruffle-ios.xcodeproj).\n\nTo open an SWF/Ruffle bundle, simply drag and drop the `.swf`/`.ruf` onto the simulator window, see:\nhttps://developer.apple.com/documentation/xcode/sharing-data-with-simulator\n\nNOTE: The simulator has to have read permissions for the file, you may have to place it outside the `Desktop`/`Documents`/... folders, which require special permission setup.\n\n## UI\n\nSimilar to https://getutm.app/, we should have:\n- A library of \"installed\" SWFs/bundles/saved links, editable.\n- When selecting an SWF, the navigation bar at the top shows various options\n  - Opening keyboard (maybe?)\n  - Context menu \"play, rewind, forward, back, etc.\"?\n  - Allow changing between scale\n  - Back button to go back to library\n- \"Add\" and \"edit\" are two different flows, and should show two different UIs\n  - \"Add\" doesn't have to show all the extra settings; it is only about getting the file. The user can edit it later.\n\n## Library item settings\n\nSettings are stored per Ruffle Bundle.\n\n- `PlayerOptions`\n  - https://github.com/ruffle-rs/ruffle/blob/master/frontend-utils/src/bundle/README.md#player\n- Inputs:\n  - Configurable\n  - Swipe for arrow keys?\n  - https://openemu.org/ does it pretty well, equivalent for iOS?\n- Custom name?\n- Custom image?\n\n\n## Storage\n\nWe do not store Ruffle Bundles / SWFs, the user is responsible for doing that themselves in the Files app. We only store \"bookmarks\" to these, to allow easily re-opening from within the app, and to store user data.\n\nThis can be synced to iCloud, though the user may have to re-select the referenced Ruffle Bundle (in case it was stored locally, and not in iCloud).\n\nGoal: Be backwards and forwards compatible with new versions of the Ruffle app.\n- Upheld for [Ruffle Bundles](https://discord.com/channels/610531541889581066/1225519553916829736/1232031955751665777).\n- Should also be fine for user settings.\n\nSee [src/storage.rs] for implementation.\n\n\n## Terminology\n\nWhat do we call an SWF / a Ruffle Bundle? \"Game\"? \"Movie\"? \"SWF\"? \"Flash Animation\"?\n\nInternally: \"movie\".\n\n\n## Plan\n\n1. Get the Ruffle UI running in a `UIView`\n2. Wire up some way to start it using an SWF on the local device\n\n\n## TODO\n\n- Set `idleTimerDisabled` at the appropriate time\n- Use white for labels, orange for buttons\n- Add settings button in library item\n- Add quicklook thumbnail generator app extension\n- Figure out what `UIDocument` actually does?\n- Ensure that CoreData stores a bookmark of the NSURL, and if not, do that ourselves.\n  - https://developer.apple.com/documentation/foundation/nsurl/1417795-bookmarkdatawithoptions?language=objc\n  - https://developer.apple.com/documentation/foundation/nsurl/1408532-writebookmarkdata?language=objc\n- Sync\n  - https://developer.apple.com/documentation/xcode/configuring-icloud-services?language=objc\n  - https://developer.apple.com/documentation/foundation/optimizing_your_app_s_data_for_icloud_backup?language=objc\n  - https://developer.apple.com/library/archive/documentation/General/Conceptual/iCloudDesignGuide/Chapters/DesigningForDocumentsIniCloud.html#//apple_ref/doc/uid/TP40012094-CH2\n  - https://developer.apple.com/documentation/uikit/synchronizing-documents-in-the-icloud-environment?language=objc\n\n## Choices\n\n- Intentionally use `public.app-category.games` to get better performance (\"Game Mode\" on macOS).\n  - This is not necessarily the correct choice for Ruffle, but it's the closest.\n- It doesn't make sense to have root settings like in the desktop version\n- No tab bar, not really desired, since we generally want the SWF's UI to fill most of the screen\n  - Though if we decide to add an easy way to download from \"trusted\" sources, we could add a tab bar for that\n- A navigation bar is useful though\n  - To display some settings for the current swf\n  - To go back to library\n  - Hide when entering full screen?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadsmtm%2Fruffle-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadsmtm%2Fruffle-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadsmtm%2Fruffle-ios/lists"}