Home

Awesome

Wikipedia iOS

The official Wikipedia iOS app.

Wikipedia MIT license

Building and Running

In the directory, run ./scripts/setup. Note: going to scripts directory and running setup will not work due to relative paths.

Running scripts/setup will setup your computer to build and run the app. The script assumes you have Xcode installed already. It will install homebrew, SwiftLint, and ClangFormat. It will also create a pre-commit hook that uses ClangFormat for linting Objective-C code.

After running scripts/setup, you should be able to open Wikipedia.xcodeproj 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.

Required Dependencies

If you'd rather install the development prerequisites yourself without our script:

Contributing

Covered in the contributing document.

Development Guidelines

These are general guidelines rather than hard rules.

Coding Guidelines

Formatting

We use Xcode's default 4 space indentation and our .clang-format file with the pre-commit hook setup by scripts/setup. Where possible, our Swift code is automatically formatted by SwiftLint based on the rules defined in .swiftlint-autocorrect.yml.

Process and Code Review Norms

Covered in the process document.

Logging

When reading logs, note that the log levels are shortened to emoji.

The app only writes Warning and Error messages to the console for both Debug and Release mode. If you need to log all messages temporarily during troubleshooting, update this level to DDLogLevelAll.

Testing

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 order for the tests to pass, the test device's language and region must be set to en-US in Settings → General → Language & Region. There is a ticket filed to update the tests to pass regardless of language and region.

Schemes and Targets

Continuous Integration

Covered in the CI document.

Web Development

The article view and several other components of the app rely on web components. Instructions for working on these components are covered in the web development document.

Contact Us

If you have any questions or comments, you can email us at ios-support[at]wikimedia dot org. We'll also gladly accept any bug reports.