Giter Club home page Giter Club logo

wikipedia-ios's Introduction

Wikipedia iOS

The official Wikipedia iOS app.

MIT license

Note: The latest main branch is set up to build with Xcode 12.

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, Carthage, and ClangFormat. It will also create a pre-commit hook that uses ClangFormat for linting.

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 or messaging us on IRC in #wikimedia-mobile on Freenode.

Required dependencies

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

  • 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.
  • Carthage - We check in prebuilt dependencies to simplify the initial build and run experience but you'll still need Carthage installed to allow Xcode to properly copy the frameworks into the built app. After you add, remove, or upgrade a dependency, you should run scripts/carthage_update to update the built dependencies.
  • ClangFormat - We use this for linting

Contributing

Covered in the contributing document.

Development Guidelines

These are general guidelines rather than hard rules.

Objective-C

Swift

Formatting

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.

Process and code review norms

Covered in the process document.

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. Screenshot tests will fail unless you are running on one of the configurations defined by configurations_to_test_on_pull in fastlane/Fastfile.

Targets

Wikipedia

Points to production servers.

Staging

Points to the Apps team's staging environment for page content and production for everything else. Has additional debugging menus and is pushed to TestFlight as a separate app bundle.

Local Page Content Service and Announcements

Points to the mobileapps and wikifeeds repos running locally.

MediaWiki Beta Cluster

Points to the MediaWiki beta cluster for MediaWiki API calls and production for everything else.

RTL

Launches the app in an RTL locale using the -AppleLocale argument.

Experimental

For one off builds, can point to whatever is needed for the given experiment.

User Testing

For user testing. Has an alternate configuration so that it can be delivered ad hoc.

Event Logging Dev Debug

For testing the events that the app sends to Event Logging. Points to the Event Logging staging environment.

Beta Cluster tests

Tests that run against the MediaWiki beta cluster, checking for upstream changes to MediaWiki that might break any assumptions we have.

UITests

Runs automated screenshot tests.

WMF

Bundles up the app logic shared between the main app and the extensions (widgets, notifications).

Updating localizations

Covered in the localization document.

Adding new Wikipedia languages or updating language configurations

Covered in the languages document.

{{name}}Widget, {{name}}Notification, {{name}}Stickers

Extensions for widgets, notifications, and stickers.

codemirror-config

Generates the CodeMirror configuration files. CodeMirror is used in the section editor.

Continuous integration

Covered in the ci document.

Event logging

Covered in the event logging document.

Web development

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

Contact us

If you have any questions or comments, you can join the #wikimedia-mobile channel on the Freenode IRC server. We'll also gladly accept any bug reports.

wikipedia-ios's People

Contributors

amrox avatar barbaramartina avatar bearloga avatar berndsi avatar bgerstle avatar bvibber avatar coreyfloyd avatar deskana avatar dr0ptp4kt avatar gabicoware avatar hhanke avatar huayu0723 avatar jantimar avatar joewalsh avatar josve05a avatar julienbodet avatar kellyroach avatar logan-keller avatar mdholloway avatar michalciurus avatar montehurd avatar natharateh avatar ndis1 avatar niedzielski avatar nirzar avatar staykids avatar tonisevener avatar translatewiki avatar waffleboot avatar wmf-apps-ci avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.