{"id":44947440,"url":"https://github.com/globulus/swiftui-gif","last_synced_at":"2026-02-18T10:00:30.607Z","repository":{"id":49362488,"uuid":"396869456","full_name":"globulus/swiftui-gif","owner":"globulus","description":"GIFImage component for your SwiftUI app!","archived":false,"fork":false,"pushed_at":"2024-04-24T10:53:07.000Z","size":273,"stargazers_count":52,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-24T13:34:49.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/globulus.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}},"created_at":"2021-08-16T16:07:20.000Z","updated_at":"2025-03-19T12:22:26.000Z","dependencies_parsed_at":"2023-02-15T06:46:42.486Z","dependency_job_id":null,"html_url":"https://github.com/globulus/swiftui-gif","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/globulus/swiftui-gif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globulus%2Fswiftui-gif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globulus%2Fswiftui-gif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globulus%2Fswiftui-gif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globulus%2Fswiftui-gif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globulus","download_url":"https://codeload.github.com/globulus/swiftui-gif/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globulus%2Fswiftui-gif/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29575343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-18T10:00:16.992Z","updated_at":"2026-02-18T10:00:30.595Z","avatar_url":"https://github.com/globulus.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftUI GIF\n\nLightweight SwiftUI component for rendering GIFs from data or assets, with no external dependencies. As a bonus, there's an extension that loads GIFs into `UIImage`s,  as well as a UIKIt-compatible `UIGIFImage` class.\n\n![Preview](https://github.com/globulus/swiftui-gif/blob/main/Images/preview.gif?raw=true)\n\n## Installation\n\nThis component is distributed as a **Swift package**.\n\n## Sample usage\n\n```swift\nstruct GIFImageTest: View {\n  @State private var imageData: Data? = nil\n  @State private var isDone = false\n  \n  var body: some View {\n    VStack {\n      GIFImage(name: \"preview\") // load from assets\n        .frame(height: 300)\n      if let data = imageData {\n        GIFImage(data: data) // load from data\n          .frame(width: 300)\n        if isDone {\n          Text(\"Done\")\n        } else {\n          // set max repetitions and completion block for\n          // when the animation completes\n          GIFImage(data: data, repetitions: 2) {\n            isDone = true\n          }\n          .frame(width: 300)\n        }\n      } else {\n        Text(\"Loading...\")\n          .onAppear(perform: loadData)\n      }\n    }\n  }\n  \n  private func loadData() {\n    let task = URLSession.shared.dataTask(with: URL(string: \"https://github.com/globulus/swiftui-webview/raw/main/Images/preview_macos.gif?raw=true\")!) { data, response, error in\n      imageData = data\n    }\n    task.resume()\n  }\n}\n```\n\n## Recipe\n\nFor a more detailed description of the code, [visit this recipe](https://swiftuirecipes.com/blog/webview-in-swiftui). Check out [SwiftUIRecipes.com](https://swiftuirecipes.com) for more **SwiftUI recipes**!\n\n## Changelog\n\n* 1.1.1 - Allowed selecting Bundle other than main.\n* 1.1.0 - Added repetition count and completion block.\n* 1.0.0 - Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobulus%2Fswiftui-gif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobulus%2Fswiftui-gif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobulus%2Fswiftui-gif/lists"}