{"id":13459676,"url":"https://heckj.github.io/swiftui-notes/","last_synced_at":"2025-03-24T18:31:03.584Z","repository":{"id":38240287,"uuid":"191648370","full_name":"heckj/swiftui-notes","owner":"heckj","description":"content for Using Combine - notes on learning Combine with UIKit and SwiftUI","archived":false,"fork":false,"pushed_at":"2024-05-20T21:59:04.000Z","size":21948,"stargazers_count":1918,"open_issues_count":22,"forks_count":200,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-05-22T00:15:22.723Z","etag":null,"topics":["combine","combine-framework","swiftui"],"latest_commit_sha":null,"homepage":"https://heckj.github.io/swiftui-notes/","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/heckj.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-12T21:38:47.000Z","updated_at":"2024-05-30T11:34:17.476Z","dependencies_parsed_at":"2024-05-30T11:44:26.104Z","dependency_job_id":null,"html_url":"https://github.com/heckj/swiftui-notes","commit_stats":{"total_commits":621,"total_committers":36,"mean_commits":17.25,"dds":0.2125603864734299,"last_synced_commit":"e7884cce9b472b143a26a0b755e0f5ebc5b4f9dc"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2Fswiftui-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2Fswiftui-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2Fswiftui-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2Fswiftui-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heckj","download_url":"https://codeload.github.com/heckj/swiftui-notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221564905,"owners_count":16844312,"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":["combine","combine-framework","swiftui"],"created_at":"2024-07-31T10:00:24.594Z","updated_at":"2024-10-29T05:31:12.207Z","avatar_url":"https://github.com/heckj.png","language":"Swift","readme":"![Using Combine](https://raw.githubusercontent.com/heckj/swiftui-notes/master/Assets/Images/UsingCombineWithSwiftGitHubSocial.png)\n\n# SwiftUI-Notes [![Build Status](https://travis-ci.org/heckj/swiftui-notes.svg?branch=master)](https://travis-ci.org/heckj/swiftui-notes)\n\nA collection of notes, project pieces, playgrounds and ideas on learning and using SwiftUI and Combine.\nChanges, corrections, and feedback all welcome! See [CONTRIBUTING](CONTRIBUTING.md) for details and links.\n\n## Goal\n\nWhile I started digging into SwiftUI, I was attracted to Combine and realized how much depth there was in just the Combine framework.\nI wanted to learn Combine, and describing how to use it to other people works really well for me.\n\nMy goal for this is to create easily accessible reference documentation for myself, and for anyone else\nwanting to use it. I do (not-so-secretly) hope that Apple's own reference documentation will completely\nobviate the reference section of all of this, but it doesn't today.\n\nWhat makes good reference documentation for me:\n\n- core concepts in some detail, explaining what's intended and expected\n- reference of all of the classes and functions you might use, organized and grouped by why you might be using them\n  - having commented sample code that illustrate how the function or class can be used\n- common or frequent recipes/patterns of how you might want to use this framework\n- how to test/validate your own creations using the framework\n\nBonus points:\n\n- internal self-references to functions, classes, and concepts to supporting navigating based on what you're trying to learn or understand\n  - self-consistent navigation of rendered content\n- usable from mobile \u0026 desktop\n- diagrams for the functions to make what they do more easily understood (aka marble diagrams)\n- consumable in multiple formats: hosted HTML, pdf, epub\n  - hosted HTML easily referencable from source code\n\n## Where stuff resides\n\nThe [`docs` directory](https://github.com/heckj/swiftui-notes/tree/master/docs) in this\nrepository is the source for the HTML content hosted at \u003chttps://heckj.github.io/swiftui-notes/\u003e\n\nThe project (`SwiftUI-Notes.xcodeproj`) has sample code, tests, and trials used in building and vetting\nthe content.\n\nThe content is hosted by Github (on github pages), generated with Jekyll, primarily written in Markdown.\n\n### Setting up asciidoctor for local rendering\n\n- get a more recent ruby (I'm using rbenv with `brew install rbenv`), current 2.6.3\n\nThe git metadata requires \"rugged\", which wants cmake to install it... so you might need to\n`brew install cmake` to make this all work.\n\n```bash\nrbenv install 2.6.3\nrbenv global 2.6.3\n\ngem install bundler\ngem install asciidoctor\nNOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install asciidoctor-epub3 --pre\ngem install pygments.rb\n\ngem install rugged # required for the git-metadata extension, requires 'cmake'\n```\n\nIf you have docker installed, you can also use a docker image to do the rendering,\nand not have to install anything directly. If you want to try out different extensions,\nyou probably want to install this locally, but if you're just generating the output\nthen the docker path is significantly easier.\n\nThe \"official\" image is [asciidoctor/docker-asciidoctor](https://hub.docker.com/r/asciidoctor/docker-asciidoctor/).\nI have a small variant at [heckj/docker-asciidoctor](https://hub.docker.com/r/asciidoctor/docker-asciidoctor/)\nthat is built to include the gem `rugged` which is providing the git metadata resolution.\n\n### Rendering - using locally installed asciidoctor \u0026 tooling\n\n```bash\ncd docs\n\nasciidoctor-epub3 -v -t -D output \\\n  using-combine-book.adoc\n\nasciidoctor-pdf -v -t -D output \\\n  using-combine-book.adoc\n\nasciidoctor -v -t -D output \\\n  -r ./lib/google-analytics-docinfoprocessor.rb \\\n  using-combine-book.adoc\n```\n\n### Rendering - using a docker-based toolchain\n\nYou can do all this rendering locally with docker. Do this from the **top** of the repository:\n\n```bash\n# get the docker image loaded locally\ndocker pull heckj/docker-asciidoctor\n\n# render the HTML, results will appear in `output` directory\ndocker run --rm -v $(pwd):/documents/ --name asciidoc-to-html heckj/docker-asciidoctor asciidoctor -v -t -D /documents/output -r ./docs/lib/google-analytics-docinfoprocessor.rb docs/using-combine-book.adoc\n\n# render a PDF, results will appear in `output` directory\ndocker run --rm -v $(pwd):/documents/ --name asciidoc-to-pdf heckj/docker-asciidoctor asciidoctor-pdf -v -t -D /documents/output docs/using-combine-book.adoc\n\n# render an epub3 file, will should appear in `output` directory\ndocker run --rm -v $(pwd):/documents/ --name asciidoc-to-epub3 heckj/docker-asciidoctor asciidoctor-epub3 -v -t -D /documents/output docs/using-combine-book.adoc\n\n# copy in the images for the HTML\ncp -r docs/images output/images\n```\n\nA variation of these commands are included in the [`.travisCI`](.travis.yml) build configuration.\n\n## Link Validation\n\nThere's an NPM package that will hit a page and do a scan for broken links: https://www.npmjs.com/package/broken-link-checker[broken-link-checker].\n\nTo install:\n\n    npm install broken-link-checker\n\nTo run it against the live site:\n\n    ./node_modules/.bin/blc http://heckj.github.io/swiftui-notes/ | grep BROKEN\n\n## Command-line build and test\n\n    xcodebuild test -scheme SwiftUI-Notes -allowProvisioningUpdates\n","funding_links":[],"categories":["Conteúdos","Books","📖 Books","Content"],"sub_categories":["Interface","Combine","Books"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/heckj.github.io%2Fswiftui-notes%2F","html_url":"https://awesome.ecosyste.ms/projects/heckj.github.io%2Fswiftui-notes%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/heckj.github.io%2Fswiftui-notes%2F/lists"}