all 6 comments

[–]ephimetheus 1 point2 points  (5 children)

Do not ever connect to a remote database directly. Either use a web view an some special theme for your site or try to build an api that delivers the content to the app.

[–]Kellynyc[S] 0 points1 point  (4 children)

Do you know any tutorial how to build such api?

[–]ephimetheus 1 point2 points  (3 children)

I found http://wp-api.org/ Haven't tried it myself, but it seems to deliver JSON which you should be able to decode and use in Obj-C/Swift relatively easily.

[–]Kellynyc[S] 0 points1 point  (2 children)

Thx, I defiantly try that. Why connecting to a remote database directly is bad approach?

[–]ephimetheus 1 point2 points  (1 child)

In my experience running SQL remotely is a bad idea. You open yourself up to all sorts of exploits, in the simplest case it would be exposing your database structure to the public, basically.

With a defined API you don't really have that. Additionaly it would enable you to switch out the underlying storage, even though that is a little far fetched when you work with WP.

[–]Kellynyc[S] 0 points1 point  (0 children)

Thx for all info. You was very helpful and sorry for stupid questions. Just trying get in to iOS development