The official Wikipedia iOS client.
- License: MIT License
- Source repo: https://github.com/wikimedia/wikipedia-ios
- Planning (bugs & features): https://phabricator.wikimedia.org/project/view/782/
- IRC chat: #wikimedia-ios on irc.freenode.net
- Team page: https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS
The app is primarily being developed by the Wikimedia Foundation's Mobile Apps team. This README provides high-level guidelines for getting started with the project. If you have any questions, comments, or issues, the easiest way to talk to us is joining the #wikimedia-mobile channel on the Freenode IRC server during Eastern and Pacific business hours. We'll also gladly accept any tickets filed against the project in Phabricator.
Building and Running
- Xcode - The easiest way to get Xcode is from the App Store, but you can also download it from developer.apple.com if you have an AppleID registered with an Apple Developer account.
scripts/setup before building & running in Xcode to install all of the required dependencies. This may take a while as it will also compile any code dependencies.
scripts/setup will install:
At this point, you should be able to open
Wikipedia.xcodeproject and run the app on the iOS Simulator (using the Wikipedia scheme and target). If you encounter any issues, please don't hesitate to let us know via a bug report or messaging us on IRC in #wikimedia-ios on Freenode.
These are general guidelines rather than hard rules.
We use Xcode's default 4 space indentation and our
.clang-format file with the pre-commit hook setup by
scripts/setup. Currently, this does not enforce Swift formatting.
The Wikipedia scheme is configured to execute the project's iOS unit tests, which can be run using the
Cmd+U hotkey or the Product->Test menu bar action.
If you're interested in contributing to the project, you can find our current product, bug, and engineering backlogs on the iOS App Phabricator project board. Once you pick a task, make sure you assign it to yourself to ensure nobody else duplicates your work. The #Easy tag in Phabricator can also help you find tasks that are ideal for new contributors because they're small and/or well-defined. We suggest you filter the #Easy project to only show tasks in the Wikipedia iOS app projects.
We do all of our active development on the develop branch. Your pull requests will automatically be targeted at that branch by Github. To make merging easier, be sure you create your branches based on the develop branch.
Once your contributions are ready for review, post a pull request on GitHub and Travis should verify your changes. Once the build succeeds, one of the maintainers will stop to approve the changes for merging.
We also maintain a mirror of this repository on Gerrit (see above), syncing the code after every release. If you'd rather use Gerrit to send us a patch, you'll need to:
- Create an SSH key
- Create a Wikimedia developer account
- Clone the gerrit repo:
git clone ssh://<wikimedia-dev-username>@gerrit.wikimedia.org:29418/apps/ios/wikipedia.git
- Install git-review
- Make some changes...
- Squash them into one commit (following our commit subject and message guidelines)
- Submit your commit review:
- You should see a URL pointing your patch on gerrit.wikimedia.org
- Add two or more of the team members as reviewers for your patch
Other Development Dependencies
Certain development and maintenance tasks will require the installation of specific tools. Many of these tools are installable using Homebrew, which is our recommended package manager.
Homebrew and many other tools require the Xcode command line tools, which can be installed by running
xcode-select --installon newer versions of OS X. They can also be installed via Xcode or downloaded from the Apple Developer downloads page on older versions of OS X.
brew install carthage
We use Carthage as our dependency manager. It is required to build the project. After installing carthage, (or running
scripts/setup) you should be able to build & run in Xcode.
scripts/carthage_bootstrap is run as a build step by Xcode. Your first build will take a while as the dependencies are built. Subsequent builds will re-use the prebuilt dependencies.
brew install clang-format
As mentioned in best practices and coding style, we use clang-format to lint the project's Objective-C code. Installation via Homebrew is straightforward:
brew install clang-format. We use a pre-commit hook to format code. The pre commit hook is
scripts/clang_format_diff and is installed by
brew install npm
www/package.json for an up-to-date list). Similar to our native dependencies, we have committed certain files to the repository to remove node and npm as build dependencies in an effort to streamline typical application development. Please see Wikipedia iOS Web Development for more information about how to work with the web components in this project.
fastlane automates common development tasks - for example bumping version numbers, running tests on multiple configurations, or submitting to the App Store. You can list the available lanes (our project-specific scripts) using
bundle exec fastlane lanes. You can list available actions (all actions available to be scripted via lanes) using
bundle exec fastlane actions. The fastlane configuration and scripts are in the
Tests are run on Jenkins in response to pull requests. Volunteer contributor pull requests require an
ok to test comment on the pull request from a project admin before tests are run.