Skip to content

Github mirror of "apps/ios/wikipedia" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Notifications You must be signed in to change notification settings

thinkma/apps-ios-wikipedia

 
 

Repository files navigation

Wikipedia for iOS

Meta

Setup

Because of the nature of the project (read: lots of HTML), we have several layers of dependencies. Having said that, we have automated much of the setup so it's not too bad to set the project up and start contributing.

Specifically, many tasks have been implemented in the Makefile. Run make or make help to see a list of available tasks (or targets). For instance, simply run make build-sim to see if your machine is setup and ready to go.

Read on to get started…

Dependencies

Before you start

Homebrew

Many of the dependencies below are installed easiest via Homebrew. it is recommended that you install it before proceeding. If you run into issues installing dependencies with homebrew, run brew doctor to get hints on how to fix them.

Bundler

Bundler is optional, but required for using the Make File and is recommended for installing CocoaPods, along with any other RubyGem dependencies declared in the project's Gemfile.

Make File

Once Bundler is installed, you can run make get-deps to check for the dependencies below (it will also install any gems and pods for you automatically)

Build Dependencies

These tools are needed for building and running the app.

  • Xcode 6 or higher on Mac OS X, available on the App Store or developer.apple.com after signing in with your Apple ID.
  • Ruby: comes bundled with OS X (this project only requires the system version).
  • CocoaPods is a Ruby gem that the project uses to download and integrate third-party iOS components.
  • NodeJS: The web assets which are bundled in the app are built using a Node toolchain, specifically grunt which is installed using npm.
  • ImageMagick and Ghostscript: We generate environment specific icons at build time using these tools. You can install them via homebrew by running brew install imagemagick and brew install ghostscript, respectively.

Patch Submission Dependencies

These tools are required when you intend on submitting a patch.

  • uncrustify for formatting source code to conform to our Style Guide. You can install it using homebrew by running: brew install uncrustify.

BBUncrustifyPlugin is an easy way to uncrustify files within the Xcode UI. You can install it from source or by first installing Alcatraz

CI Dependencies

These tools are required if you want to work on the build system.

  • Xcode Command Line Tools: You can install via the Xcode UI or run xcode-select --install in Terminal. You can find instructions online for downloading the them via Xcode or the Apple developer portal.
  • Fastlane is a Ruby gem that automates build tasks. We use Fastlane in conjunction with Jenkins to support our continuous integration workflow.

Advanced Tools

These tools are for managing multiple environments and dependencies. If you plan on modifying Pods or need this project's dependencies to coexist along side other projects, try these:

  • rbenv is nice for managing mulitple Ruby versions.
  • nodenv is recommended for managing multiple node versions.

Building

Once all the dependencies are installed, you can run from build the following ways:

  • Xcode UI - just open the Wikipedia.workspace file and click build.
  • xcodebuild - you can build from the command line with the Apple provided tool.
  • Make file - just type make build-sim in the Terminal and it will compile the project for the iOS simulator.
  • Fastlane - just type fastlane lane_name to build the app for the specified lane.

Problems?

If you are unable to build, please file a bug and/or contact us via IRC or email. See the top of this file for our contact information. Please include any console logs and/or Xcode screenshots along with a description of your environment.

Running

Use Xcode to run the WikipediaDebug scheme and target for the destination of your choosing (i.e. simulator or device). Keep in mind that you'll need to provision iOS hardware with an active developer account in order to build and run the app on a device.

Testing

Use the Xcode Product -> Test menu-bar action (or Cmd + U for hotkey fanatics) to run the WikipediaUnitTests target in any scheme. Tests can also be executed from the command line by running make test.

Filing Bugs

Please file bugs on Phabricator and be sure to use the Wikipedia-App-iOS-App tag.

Submitting patches

Before submitting a patch be sure to use Uncrustify to format your code (See installation instructions above).

To ease the process, you can install a pre-push hook by running the script /scripts/setup_git_hooks.sh or by using the BBUncrustifyPlugin as mentioned above.

See mediawiki.org's Gerrit page for general information about contributing to Wikimedia project source code hosted in Gerrit -- use the project name "apps/ios/wikipedia" in place of "mediawiki/core" etc.

You can also follow or fork from our GitHub mirror. Note that pull requests submitted through GitHub must be manually copied over to Gerrit for review and merge (though there is a bot we plan to enable to simplify this).

Please include unit tests with any new code where possible.

Architecture

This generation of the Wikipedia app is built around native UI chrome (menus, toolbars, search UI, preferences, caching, etc) to improve startup time, responsiveness and "nativey" look-n-feel versus a previous HTML-based approach using PhoneGap/Apache Cordova.

The majority of app logic and UI will be in the native layer; we expect to use the WebView component as a relatively dumb content display & event trigger layer.

Development team

The app is primarily being developed by the Wikimedia Foundation's Mobile Apps team, starting at the end of October 2013. We maintain iOS specific documentation here. The team operates on an "agile"-style process with 2-week sprints and daily stand-ups on at 10:15am US Pacific Time.

Volunteer contributions are welcome!

We can be reached during Eastern and Pacific office hours (and sometimes outside them) in IRC: #wikimedia-mobile on irc.freenode.net.

Previous Source

This is a native rewrite of the original Wikipedia reader application for iOS.

About

Github mirror of "apps/ios/wikipedia" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 96.1%
  • JavaScript 1.8%
  • Shell 0.4%
  • PHP 0.4%
  • Ruby 0.3%
  • HTML 0.3%
  • Other 0.7%