Skip to content
Browse Swift users on GitHub
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Swifters.xcodeproj
Swifters
docs
tools
.gitignore
LICENSE
README.md
config.json.in
package-lock.json
package.json

README.md

Swifters

The Swifters iOS app lets you browse Swift users on GitHub. Its purpose is to explore GraphQL with Apollo iOS, a strongly-typed, caching GraphQL client. Swifters queries GitHub’s GraphQL API v4. If your new to GraphQL, you might want to read my introduction.

The Swifters iOS app lets you browse Swift users on GitHub. Its purpose is to explore GraphQL with Apollo iOS, a strongly-typed, caching GraphQL client. Swifters queries GitHub’s GraphQL API v4.

Screenshot 1 Screenshot 2

Swifters progressively populates its cache, while users scroll a list of Swift developers on GitHub, loading two to three handfuls of Swifters at a time. Tapping a developer in the list shows details.

Objectives

Dependencies

  • 🕸 Apollo, Caching GraphQL client for iOS
  • 🖼 Nuke, Image loading and caching
  • 🔗 Ola, Check reachability of host
  • 🦀 DeepDiff Amazingly incredible extraordinary lightning fast diffing

Installation

Setting up for development, dependency repos are getting cloned to ../. Consider wrapping the project in its own directory if these would collide with existing directories of yours.

$ ./tools/setup

Add Swifters.xcodeproj and the dependency .xcodeproj files, Apollo, Nuke, and Ola, to an Xcode Workspace.

Apollo iOS uses the Apollo command-line tool. Declared in package.json, we can install this dependency with npm.

$ npm i

Let’s check if the Apollo CLI is accessible with npx, the npm package runner for executing CLI tools locally. Without npx we would have to install the apollo package globally.

$ npx apollo -v
›   Warning: apollo update available from 1.9.2 to 2.4.3
apollo/1.9.2 darwin-x64 node-v8.12.0

All right! That warning is fine.

Accessing GitHub GraphQL API v4

A personal access token is required to communicate with GitHub’s GraphQL server.

Swifters needs following scopes:

read:user
user:email

To configure the app with your token, do:

GITHUB_TOKEN=<token> ./tools/configure

Building the App

Xcode needs access to the Node toolchain. If you’re having issues with Xcode not finding Node, try:

ln -s $(which node) /usr/local/bin/node

You might have to do the same for npm and npx.

License

MIT License

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.