{"id":21389337,"url":"https://github.com/isaced/worktile-swiftsdk","last_synced_at":"2025-10-17T04:02:02.660Z","repository":{"id":34477847,"uuid":"38415917","full_name":"isaced/Worktile-SwiftSDK","owner":"isaced","description":"Worktile 基于 Swift 的 SDK","archived":false,"fork":false,"pushed_at":"2015-07-24T09:01:56.000Z","size":204,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-22T01:32:49.806Z","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/isaced.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":"2015-07-02T06:39:48.000Z","updated_at":"2017-09-05T15:01:45.000Z","dependencies_parsed_at":"2022-09-14T09:00:53.653Z","dependency_job_id":null,"html_url":"https://github.com/isaced/Worktile-SwiftSDK","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/isaced%2FWorktile-SwiftSDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2FWorktile-SwiftSDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2FWorktile-SwiftSDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaced%2FWorktile-SwiftSDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaced","download_url":"https://codeload.github.com/isaced/Worktile-SwiftSDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225896359,"owners_count":17541482,"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-11-22T12:26:01.883Z","updated_at":"2025-10-17T04:01:57.618Z","avatar_url":"https://github.com/isaced.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Worktile Swift SDK\n\n基于官方 Rest API 使用 Swift 2.0 为 Worktile 封装的一套 SDK，方便 Cocoa 开发者使用 Swift 进行开发。\n\n\u003e 计划支持 iOS 和 OS X，目前先针对 iOS 平台进行开发完善，后续会支持 OS X 平台\n\n### 开发环境：\n\n- Xcode 7.0 beta\n- Swift 2.0\n- iOS8 +\n\n### 实现功能\n\n- [x] OAuth2 登录授权\n- [x] 获取用户信息\n- [x] 团队\n- [x] 项目\n- [x] 任务组\n- [ ] 任务\n- [ ] 日程\n- [ ] 文件\n- [ ] 话题\n- [ ] 文档\n\n\u003e 这里可以随时查看开发进度，也欢迎有兴趣的开发者来添砖加瓦！\n\u003e \n\u003e 有任何问题也请您让我知道，我会积极地维护这个项目。\n\n### 使用\n\n本项目内包含一个 iOS Demo，基本实现了所有 SDK 方法的调用和说明，这里也简单介绍一下：\n\n首先 SDK 内包含完整的 OAuth2 认证授权流程，首先需要你在 Worktile 开放平台创建你自己的 APP 并拿到 App Key，然后用以下代码初始化 SDK 类：\n\n``` \nlet worktile = Worktile(appKey: \"xxxx\")\n```\n\n然后可以通过 `needAuthorize` 属性来判断用户是否需要进行授权登录，如果需要则通过 `authorizeViewController()`方法来得到一个登录用的 ViewController，用户在这个视图控制器上输入用户名密码连接 Worktile 并得到 *access token* ，你可以通过给这个 worktile 实例设置 `delegate\u003cWorktileDelegate\u003e` ，然后通过 `authorizeComplate` 方法来接收用户登录授权成功或失败的消息。\n\n一旦授权成功，SDK 会记录并保存下来 *access token* ，当然也包括 token 的过期时间，过期时间内就可以直接使用上次请求的 *access token*，不用自己保存或重新授权了。\n\n\u003e 注意：Worktile 类并不是单例，所以你需要自己持有它！\n\n\u003cimg src=\"http://ww1.sinaimg.cn/large/79439f49gw1etpq05ic7aj20hs0vkdhi.jpg\" width = \"320\" height = \"568\" align = \"center\" /\u003e\n\n### 参考\n\n- [API 接口文档](https://open.worktile.com/wiki/)\n\n### 感谢\n\n🙏 [Alamofire](https://github.com/Alamofire/Alamofire)\n\n🙏 [Carthage](https://github.com/Carthage/Carthage)\n\n### 开源许可协议\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaced%2Fworktile-swiftsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaced%2Fworktile-swiftsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaced%2Fworktile-swiftsdk/lists"}