Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Wikipedia Places Deep Linking

Description

This project extends the Wikipedia iOS app by modifying its deep linking capabilities. Now, external apps can open Wikipedia directly in the Places tab and display a specified location using longitude and latitude coordinates instead of the current location.

Additionally, a SwiftUI test app (WikipediaPlace) is created to demonstrate this functionality. This app:

  • βœ… Fetches a list of locations from a remote JSON file.
  • βœ… Allows users to select a location or enter custom coordinates.
  • βœ… Opens the Wikipedia app and navigates to the Places tab with the specified location.
  • βœ… Caches the locations for offline use.

Installation & Setup

1. Clone & Set Up the Wikipedia iOS App

Clone the repository and run setup script ./scripts/setup

Note: This script installs dependencies like Homebrew, SwiftLint, and ClangFormat. It also sets up a pre-commit hook for linting Objective-C code.

  • βœ… Open Wikipedia.xcodeproj in Xcode (version 16.0+).
  • βœ… Run the Wikipedia app once on a physical device or simulator.

This step is required to install Wikipedia, so the deep linking feature can work.

2. Run the Wiki Place App

  • βœ… In Xcode, select the WikipediaPlace target.
  • βœ… Run the app on a simulator or device.

How It Works

  • 1️⃣ The test app fetches locations if there is not local json file.
  • 2️⃣ Users can select a location or enter a custom location.
  • 3️⃣ The test app opens Wikipedia via deep linking, showing the specified location.

Modified Code in Wikipedia iOS App

NSUserActivity+WMFExtensions -> wmf_placesActivityWithURL PlacesViewController -> showArticleURL

Source code Wikipedia Place App

πŸ“‚ Packages β†’ WMFComponents β†’ Sources β†’ WMFComponents β†’ Components β†’ Places

Testing

Unit tests are included in WikipediaPlaceTests, however it cannot be runned due to the build errors.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages