{"id":21894407,"url":"https://github.com/pocket/pocket-ios","last_synced_at":"2025-04-12T19:47:25.470Z","repository":{"id":37855193,"uuid":"358322208","full_name":"Pocket/pocket-ios","owner":"Pocket","description":"Mozilla's Pocket iOS App, Rebuilt in Swift","archived":false,"fork":false,"pushed_at":"2025-03-17T18:59:08.000Z","size":64409,"stargazers_count":229,"open_issues_count":3,"forks_count":8,"subscribers_count":15,"default_branch":"develop","last_synced_at":"2025-04-03T23:11:18.318Z","etag":null,"topics":["graphql","ios","mozilla","news","swift"],"latest_commit_sha":null,"homepage":"https://www.getpocket.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pocket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-15T16:19:59.000Z","updated_at":"2025-03-26T07:51:23.000Z","dependencies_parsed_at":"2022-07-09T17:17:55.895Z","dependency_job_id":"43602b03-1220-4f60-b836-5539eeb222d1","html_url":"https://github.com/Pocket/pocket-ios","commit_stats":{"total_commits":2560,"total_committers":20,"mean_commits":128.0,"dds":0.61328125,"last_synced_commit":"1d4a9a01c43c1fc5e1062bbff70fa5fc28548b66"},"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pocket%2Fpocket-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pocket%2Fpocket-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pocket%2Fpocket-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pocket%2Fpocket-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pocket","download_url":"https://codeload.github.com/Pocket/pocket-ios/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"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":["graphql","ios","mozilla","news","swift"],"created_at":"2024-11-28T13:22:30.462Z","updated_at":"2025-04-12T19:47:25.444Z","avatar_url":"https://github.com/Pocket.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pocket iOS\n\nWelcome to the Next iteration of the Pocket iOS client, currently in development.\n\n# Getting Started\n\n## Setup Pocket Secrets File\n\npocket-ios requires a secrets.xcconfig file to run and secrets_test.xcconfig file to test, we have included some mock secrets in the repo but if you are a Mozillan or Pocketeer you can obtain the actual secret keys from the Pocket Team.\n\nIn the future, we plan to allow external contributors to generate their own secrets and be able to build Pocket on their own.\n\nOnce obtained you can run the following command from the root directory:\n\n```\ncp Config/secrets.xcconfig.example Config/secrets.xcconfig\n```\n\nThen replace values in `Config/secrets.xcconfig` with the values you have received.\n\nAfter you will need to run the API Generation steps below.\n\n## Install Docker (Mozillans/Pocketeers Only)\n\nTo run our UITests locally, you will need an instance of [Snowplow Micro](https://github.com/snowplow-incubator/snowplow-micro) running on your system on port 9090.\nWe use Docker for this purpose. You can install Docker using Homebrew: `brew install docker`\nOr you may download it from the [Docker website](https://docs.docker.com/desktop/install/mac-install/)\n\nOnce installed you need to provide your Docker username to the iOS lead so they can add you to the Pocket docker Organisation.\nOnce done you can simply run `docker compose up` in Terminal from the root Pocket directory to run an instance of Snowplow Micro.\n\n###Snowplow Micro\nSnowplow micro has 4 endpoints of note:\n1. http://localhost:9090/micro/all - Lists the total number of events received and whether they are bad or good.\n2. http://localhost:9090/micro/good - Returns all the good (passed validation) events snowplow received and the data within.\n3. http://localhost:9090/micro/bad - Returns all the bad (failed validation) events snowplow received and the reason why.\n3. http://localhost:9090/micro/reset - Resets snowplow to 0 events received. Should be ran at the start of each test.\n\n[SnowplowMicro](./Tests iOS/Support/SnowplowMicro) class is used to interact with Snowplow and provide helper assertions to make testing events easier.\n\n\n## Pocket Graph (API) Schema\n\nPocket for iOS uses Apollo client to autogenerate its API schema code. You will need to run the following commands every time the APIs you use change or if you change your API queries.\n\nTo Start run the following command:\n\n```bash\ncd PocketKit/\nswift package --allow-writing-to-package-directory apollo-cli-install\n```\n\n### Downloading Graph Schema\n\nTo download a new version of [`PocketKit/Sources/Sync/schema.graphqls`](./PocketKit/Sources/Sync/schema.graphqls) you can run the following commands:\n\n```bash\ncd PocketKit/\n./apollo-ios-cli fetch-schema\n```\n\n### Generating API.swift\n\nTo download a new version of [`PocketKit/Sources/Sync/API.swift`](./PocketKit/Sources/Sync/API.swift) you can run the following commands:\n\n```bash\ncd PocketKit/\n./apollo-ios-cli generate\n```\n\n### Modifiying GraphQL query/mutation in code\n\nTo modify/create a request look into `PocketKit/Sources/PocketGraph/user-defined-operations`\n\nAny modifications done here and after you generate above will be auto-generated in our codebase for usage.\n\nPreviously we used a singleton `PocketSource`, but we are moving away from that model and instead encourage the adoption of a protocol Service.  As an example, you can look at `SlateService`.\n\n### Future\n\nWe plan on implementing the following changes in the future:\n\n- Ensure that the [`PocketKit/Sources/PocketGraph/schema.graphqls`](./PocketKit/Sources/PocketGraph/schema.graphqls) and [`PocketKit/Sources/PocketGraph/`](./PocketKit/Sources/PocketGraph/) are generated on demand at build time.\n  - Blocked by needing [Swift Build Tool support in Apollo](https://github.com/apollographql/apollo-ios/pull/2464)\n\n## Setup Fonts\n\nPocket uses custom fonts: Graphik \u0026 Blanco. In order for the styles to present as expected in your local build you need to obtain the font files. Mozillians and Pocketeers can request them from the iOS manager and install them in [`PocketKit/Sources/Textile/Style/Typography/Fonts`](./PocketKit/Sources/Textile/Style/Typography/Fonts)\n\n\n## Build Targets\n\n### Pocket Kit\n\nPocketKit is the foundation of all of Pocket. Pocket is purposefully abstracted into a Kit so that we can define multiple targets in the Apple Ecosystem and still use the same code base. Here you can find the view controllers, app delegates and most entrypoints into the Pocket application.\n\n### Sync\n\nSync is the main API \u0026 Core Data layer that Pocket is built on. This library provides the work needed to communicate with the Pocket API and our Offline storage layer, backed by CoreData.\n\n### Textile\n\nTextile provides the standard views and styles that can be re-used across all of the Pocket targets we create in the Apple Ecosystem.\n\n### Analytics\n\nAnalytics provides Pocket's implementation of [Snowplow](https://github.com/snowplow/) which we use to provide a feedback loop to the Pocket product team into how our features are used.\n\n### SaveToPocketKit\n\nSaveToPocketKit is the code base needed to make the Pocket Share Extension function and is embeded in the SaveToPocket Extension that enables you to Save to Pocket from other applications.\n\n### SharedPocketKit\n\nSharedPocketKit is for code that is shared between PocketKit and SaveToPocketKit. It contains code for session management and keychain storage that is used across all apps in the Pocket App Group.\n\n## Developing in Pocket\n\nSee our Contribution Guide for day-to-day Pocket development guides.\n\u003e [!NOTE]\n\u003e As of now, contribution to Pocket is limited to Mozillians but we are planning to add external contributions to our repo. Stay tuned!\n\n## License Acknowledgements\n\nWhen you add a dependncy we need to ensure that our [OpenSource Licenses](https://getpocket.com/opensource_licenses_ios) are up to date with all licenses we are using. \n\nThe following are the high level steps to update the notices page:\n\n1. Install [LicensePlist](https://github.com/mono0926/LicensePlist) `brew install licenseplist`\n2. Run `license-plist --markdown-path Acknowledgements.markdown`\n3. Open an issue on [Bedrock](https://github.com/mozilla/bedrock/) with a description and the requested page to update with a link to a document of the generated `Acknowledgements.markdown`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocket%2Fpocket-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpocket%2Fpocket-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocket%2Fpocket-ios/lists"}