
Overview
A simple asynchronous way to download and decode public Wordpress content.
WordpressReaderExample
Check out the example app to see how you can use this package in your iOS app.
Installation
- In Xcode 13
File -> Add Packages
or in Xcode 12 go to File -> Swift Packages -> Add Package Dependency
- Paste in the repo’s url:
https://github.com/ryanlintott/WordpressReader
and select by version.
Usage
Import the package using import WordpressReader
This package is compatible with iOS 14 or later.
Is this Production-Ready?
Really it’s up to you. I currently use this package in my own Old English Wordhord app.
Support
If you like this package, buy me a coffee to say thanks!

Details
Create an instance of WordpressSite for any Wordpress.com website:
let site = WordpressSite(domain: "oldenglishwordhord.com", name: "Old English Wordhord")
Fetch posts, pages, categories, or tags asynchronously:
let posts: [WordpressPost] = try await site.fetch(.posts())
let pages: [WordpressPage] = try await site.fetch(.pages())
let categories: [WordpressCategory] = try await site.fetch(.categories())
let tags: [WordpressTag] = try await site.fetch(.tags())
Add a set of WordpressQueryItem to narrow down your request:
let request = WordpressRequest.posts([.postedAfter(aWeekAgo), .order(.asc), perPage(10)])
let posts = try await site.fetch(request)
Wordpress queries may result in several pages of items. You can customize your WordpressRequest to get the first page out quickly:
var recentPosts = WordpressRequest.posts()
recentPosts.maxPages = 1
var remainingPosts = WordpressRequest.posts()
remainingPosts.startPage = 2
self.posts = try await site.fetch(recentPosts)
self.posts += try await site.fetch(remainingPosts)
The default .fetch() will get pages in parallel but only return when they’re all done. If you want each batch in order as soon as they’re ready, use an async stream:
for try await batch in try await site.stream(request) {
self.posts += posts
}
Overview
A simple asynchronous way to download and decode public Wordpress content.
WordpressReaderExample
Check out the example app to see how you can use this package in your iOS app.
Installation
File -> Add Packages
or in Xcode 12 go toFile -> Swift Packages -> Add Package Dependency
https://github.com/ryanlintott/WordpressReader
and select by version.Usage
Import the package using
import WordpressReader
Platforms
This package is compatible with iOS 14 or later.
Is this Production-Ready?
Really it’s up to you. I currently use this package in my own Old English Wordhord app.
Support
If you like this package, buy me a coffee to say thanks!
Details
Create an instance of WordpressSite for any Wordpress.com website:
Fetch posts, pages, categories, or tags asynchronously:
Add a set of WordpressQueryItem to narrow down your request:
Wordpress queries may result in several pages of items. You can customize your WordpressRequest to get the first page out quickly:
The default .fetch() will get pages in parallel but only return when they’re all done. If you want each batch in order as soon as they’re ready, use an async stream: