{"id":13697026,"url":"https://github.com/svga/SVGAPlayer-iOS","last_synced_at":"2025-05-03T17:32:57.481Z","repository":{"id":41853651,"uuid":"86665438","full_name":"svga/SVGAPlayer-iOS","owner":"svga","description":"Similar to Lottie. Render After Effects / Animate CC (Flash) animations natively on Android and iOS, Web.  使用 SVGAPlayer 在 Android、iOS、Web中播放 After Effects / Animate CC (Flash) 动画。","archived":true,"fork":false,"pushed_at":"2023-02-06T06:36:58.000Z","size":2950,"stargazers_count":1093,"open_issues_count":30,"forks_count":322,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-26T12:02:10.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://svga.io","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svga.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","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":"2017-03-30T06:09:01.000Z","updated_at":"2025-04-17T09:26:28.000Z","dependencies_parsed_at":"2023-02-19T05:01:18.725Z","dependency_job_id":null,"html_url":"https://github.com/svga/SVGAPlayer-iOS","commit_stats":null,"previous_names":["yyued/svgaplayer-ios"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svga%2FSVGAPlayer-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svga%2FSVGAPlayer-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svga%2FSVGAPlayer-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svga%2FSVGAPlayer-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svga","download_url":"https://codeload.github.com/svga/SVGAPlayer-iOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226954,"owners_count":21714909,"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-02T18:00:51.803Z","updated_at":"2025-05-03T17:32:56.229Z","avatar_url":"https://github.com/svga.png","language":"Objective-C","funding_links":[],"categories":["UI Effects","iOS"],"sub_categories":["SVGAPlayer"],"readme":"# Archived\n本仓库已经停止维护，你仍然继续阅读源码及创建分叉，但本仓库不会继续更新，也不会回答任何 issue。\n\nThis repo has stopped maintenance, you can still continue to read the source code and create forks, but this repo will not continue to be updated, nor will it answer any issues.\n\n# SVGAPlayer\n\n[简体中文](./readme.zh.md)\n\n## 支持本项目\n\n1. 轻点 GitHub Star，让更多人看到该项目。\n\n## 2.5.0 Released\n\nThis version add Support for matte layer and dynamic matte bitmap.\u003cbr\u003e\nHead on over to [Dynamic · Matte Layer](https://github.com/yyued/SVGAPlayer-iOS/wiki/Dynamic-%C2%B7-Matte-Layer)\n\nThis version add Support for audio step to frame \u0026 percentage.\n\n## 2.3.5 Released\n\nThis version fixed SVGAPlayer `clearsAfterStop defaults too YES`, Please check your player when it doesn't need to be cleared.\n\nThis version fixed SVGAPlayer render issue on iOS 13.1, upgrade to this version ASAP.\n\n## Introduce\n\nSVGAPlayer is a light-weight animation renderer. You use [tools](http://svga.io/designer.html) to export `svga` file from `Adobe Animate CC` or `Adobe After Effects`, and then use SVGAPlayer to render animation on mobile application.\n\n`SVGAPlayer-iOS` render animation natively via iOS CoreAnimation Framework, brings you a high-performance, low-cost animation experience.\n\nIf wonder more information, go to this [website](http://svga.io/).\n\n## Usage\n\nHere introduce `SVGAPlayer-iOS` usage. Wonder exporting usage? Click [here](http://svga.io/designer.html).\n\n### Install Via CocoaPods\n\nYou want to add pod 'SVGAPlayer', '~\u003e 2.3' similar to the following to your Podfile:\n\ntarget 'MyApp' do\n  pod 'SVGAPlayer', '~\u003e 2.3'\nend\n\nThen run a `pod install` inside your terminal, or from CocoaPods.app.\n\n### Locate files\n\nSVGAPlayer could load svga file from application bundle or remote server.\n\n### Using code\n\n#### Create a `SVGAPlayer` instance.\n\n```objectivec\nSVGAPlayer *player = [[SVGAPlayer alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];\n[self.view addSubview:player]; // Add subview by yourself.\n```\n\n#### Create a `SVGAParser` instance, parse from bundle like this.\n```objectivec\nSVGAParser *parser = [[SVGAParser alloc] init];\n[parser parseWithNamed:@\"posche\" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {\n    \n} failureBlock:nil];\n```\n\n#### Create a `SVGAParser` instance, parse from remote server like this.\n\n```objectivec\nSVGAParser *parser = [[SVGAParser alloc] init];\n[parser parseWithURL:[NSURL URLWithString:@\"https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true\"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {\n    \n} failureBlock:nil];\n```\n\n#### Set videoItem to `SVGAPlayer`, play it as you want.\n\n```objectivec\n[parser parseWithURL:[NSURL URLWithString:@\"https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true\"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {\n    if (videoItem != nil) {\n        player.videoItem = videoItem;\n        [player startAnimation];\n    }\n} failureBlock:nil];\n```\n\n### Cache\n\n`SVGAParser` use `NSURLSession` request remote data via network. You may use following ways to control cache.\n\n#### Response Header\n\nServer response SVGA files in Body, and response header either. response header has cache-control / etag / expired keys, all these keys telling NSURLSession how to handle cache.\n\n#### Request NSData By Yourself\n\nIf you couldn't fix Server Response Header, You should build NSURLRequest with CachePolicy by yourself, and fetch NSData.\n\nDeliver NSData to SVGAParser, as usual.\n\n## Features\n\nHere are many feature samples.\n\n* [Replace an element with Bitmap.](https://github.com/yyued/SVGAPlayer-iOS/wiki/Dynamic-Image)\n* [Add text above an element.](https://github.com/yyued/SVGAPlayer-iOS/wiki/Dynamic-Text)\n* [Hides an element dynamicaly.](https://github.com/yyued/SVGAPlayer-iOS/wiki/Dynamic-Hidden)\n* [Use a custom drawer for element.](https://github.com/yyued/SVGAPlayer-iOS/wiki/Dynamic-Drawer)\n\n## APIs\n\nHead on over to [https://github.com/yyued/SVGAPlayer-iOS/wiki/APIs](https://github.com/yyued/SVGAPlayer-iOS/wiki/APIs)\n\n## CHANGELOG\n\nHead on over to [CHANGELOG](./CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvga%2FSVGAPlayer-iOS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvga%2FSVGAPlayer-iOS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvga%2FSVGAPlayer-iOS/lists"}