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.
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.
- β In Xcode, select the WikipediaPlace target.
- β Run the app on a simulator or device.
- 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.
NSUserActivity+WMFExtensions -> wmf_placesActivityWithURL PlacesViewController -> showArticleURL
π Packages β WMFComponents β Sources β WMFComponents β Components β Places
Unit tests are included in WikipediaPlaceTests, however it cannot be runned due to the build errors.