The official Wikipedia iOS client.
- OS target: iOS 8.0 or higher
- Device target: iPhone, iPod, iPad
- License: MIT-style
- Source repo: https://github.com/wikimedia/wikipedia-ios
- Code review:
- Planning (bugs & features): https://phabricator.wikimedia.org/project/view/782/
- IRC chat: #wikimedia-mobile 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.
This project requires Xcode 7 or higher. The easiest way to get it 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.
Most of our dependencies are either committed directly to the repo, or not necessary for most development cases. However, there might be some dependencies that require additional setup, like submodules. To make sure they're installed and ready to go, run
make prebuild
to install any "pre-build" dependencies (like submodules).
Once you have Xcode (and build dependencies) installed, you should be able to open Wikipedia.xcworkspace
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 to us on IRC.
TODO: We hope to have some high-level documentation on the application's architecture soon.
You can find our current thinking on iOS best practices and coding style on our team page. The WMFCodingStyle files are also canonical examples of our coding style, which are enforced using uncrustify.
We use CocoaPods to manage third-party native dependencies and npm for web. You shouldn't need to run either of these tools to build, run, or modify the application source, but if you do, refer to the sections below to get set up.
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. In addition to unit testing, we enforce our coding style using uncrustify. You can also use the project's Makefile to run both in one action: make verify
.
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.
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:
git 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
While typical application development is optimized to have as few dependencies as possible (i.e. cloning, building, and running should "Just Work"), 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 --install
on 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.
As mentioned in best practices and coding style, we use uncrustify to lint the project's Objective-C code. Installation via Homebrew is straightforward: brew install uncrustify
. We've also provided a pre-push git hook which automatically lints the code before pushing, which can be installed by running ./scripts/setup_git_hooks.sh
.
BBUncrustifyPlugin is an easy way to uncrustify files within the Xcode UI. You can install it from source or using Alcatraz, the unofficial Xcode package/plugin manager.
CocoaPods is a Ruby gem that the project uses to download and integrate third-party iOS components (see Podfile
for an up-to-date list). We have committed all of these dependnecies to the repository itself, removing the need to install the gem or run before building the project. However, if you want to do anything related to CocoaPods (such as upgrading the version of CocoaPods or adding a dependency), please refer to the Working With Cocoapods documentation.
Carthage is another package manager which clones and compiles iOS and OS X frameworks. We use this mainly to manage Swift dependencies separate from other dependencies which aren't able to support frameworks yet. Carthage is installable via Homebrew.
npm is a package manager for nodejs. With it, we install various node modules as Javascript dependencies and development tools (see 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.
Continuous integration is performed via Travis-CI. See the travis
lane in fastlane/Fastfile
and our .travis.yml
for details.