Virtue
Virtue

Reputation: 3

How to access Wordpress posts/data in an iOS app

I am writing an iOS app for a web site. This site is built using Wordpress. I have the overall UI structure built but I don't know I can connect to the sites server to get the needed data (posts, post titles, etc) to display through the app.

How can I do this?

Upvotes: 0

Views: 536

Answers (1)

macserv
macserv

Reputation: 3554

To start, if the site is configured in the usual way, you can add ?feed=rss2 to the URL of your WordPress-driven site to request an RSS2 feed.

Basically, you're going to NSURLConnection and the URL Loading System to fetch the RSS feed, and then parse it. You can then use NSXMLParser to read the feed, and turn it into data collections and/or model objects to hold the data. Your UI can then load and display that data as you like.

Upvotes: 1

Related Questions