Build an App for a Wordpress site. Is PhoneGap the solution? - wordpress

I have a few Wordpress sites and I would like to create apps (IOS and Android) for all of them. I did some research and found that PhoneGap (or similar products) appears to be the solution.
The App will simply get information from existing Wordpress site. I do not plan to add login/edit/post features to the app at this time. My sites have both Pages and Posts. Does that matter?
Is there any better solution than PhoneGap?
Thanks.

The two current big multi-platform solutions for apps are PhoneGap and Titanium. PhoneGap is less work, but Titanium has better performance and uses the platform default UI. Since you aren't building an advanced app, just reading JSON feeds, PhoneGap should work great for you.
It does not matter that you have both pages and posts. You will need to use a JSON API in order to get the data from WordPress. There are a couple plugins that do this and they are working on adding a JSON api to core right now. Until the core API is done, I would recommend using the WordPress.com JSON API that's included with the JetPack plugin since its made by Automattic and it has great documentation. If you go this route, you can also fairly easily add login/editing/posting later on with OAUTH2.

You should also check out Steroids.js, which builds on top of PhoneGap and adds features like real-time updates to devices without compiling, native UI elements etc.

Related

Fetch Firebase data from app to website?

I have built an iphone app that writes data to firebase. That works fine. Now I want to display that data on a website. I am totally new to programming, and had to learn swift from scratch.
So my question is; is there a easy way to display the data on the webpage? It dont have to look good as long as the data is displayed. I'm not sure if I'm able to learn another codelanguage just yet ☺
To build a web site you'd use a combination of HTML (for the layout of the web site), CSS (for the actual look of the web site) and JavaScript (for the logic of the web site). JavaScript is indeed a different language, but a second language should be easier than your first one.
I recommend studying the Firebase Database documentation for JavaScript and taking the Firebase codelab for web. They are the best ways to get started with Firebase.
You may use the Firebase JS SDK
https://firebase.google.com/docs/database/web/start
use Nodejs to generate static HTML
or
use Express as the website framework, dynamically generate the pages

What is the default WordPress API

I'm looking to start a new WordPress API based project. I want to make sure I'm starting with the best tools at hand so that I'm not changing my mind half way through. What I want to know is; What is the best supported API framework for WordPress? What is the default API that comes as part of WordPress core and how does it compare to other WP API plugins.
I'm leaning towards the WP REST API however I would like to know if the XML-RPC interface 'WordPress API' would alternatively be the right way to go.
Any feedback would be great.
The official wordpress API is still under ongoing development. You can find the old legacy REST api here, which will work, but might be broken in the future: http://wp-api.org/index-deprecated.html
As for the new and improved version 2 found here http://v2.wp-api.org/ this is the version that will be supported and used in the future. I would recommend using this API, as there will most likely not be any huge breaking changes in the future, and this is being actively maintained and developed by a considerable amount of contributors.
There's still a lot missing from the official API, but they're working away on these issues as we speak. In it's current state, it's still quite powerful.
By default WordPress come with REST-API. If you don't want to use WordPress REST-API then You can use API-Framework and access the wordpress functions.
There are small api framework like slim api framework, fat-free api framework you can use for API's.

Detect phonegap app from wordpress

I am building my app in phonegap. In that app I am calling my wordpress website like window.location="http://www.example.com/";.
Because of window.location my app UI and mobile browser UI are looks same. So I want to detect phonegap app to defer from browser UI. Is there any way to do this.
#JayTh
Okay. Thanks. VERY GOOD TO KNOW. I spend hours getting beginners to understand issues. You got them.
Okay, once you load a webpage from a website you are NOT allowed to access any of the Cordova Plugin APIs. However, you can access HTML5 API, like camera and geolocation. Again, you cannot access any of the Cordova Plugin APIs, and any of the 800+ 3rd-party APIs.
The best way to access the web, is via inAppBrowser. However, the third paragraph states:
The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. For this reason, the InAppBrowser is recommended if you need to load third-party (untrusted) content, instead of loading that into the main Cordova webview.
Apple is serious about their security, so if they detect you are going around this, they may reject your App. Just to be clear on this, there is a new security protocol, which Phonegap Build now requires, and so does Apple. With Phonegap Build, it will create the required Apple ATS entries into the Info.plist.
So, the best I can do at this point is give you three (3) links.
Top Mistakes by Developers new to Cordova/Phonegap
Core Plugins Setup
HOW TO apply the Cordova/Phonegap the whitelist system
On 1., you have hit #5 When designing the app, thinks phonegap works like a website or webbrowser.. For the remainder, I recommend just reading the bold sentences.
On 2., if you want to use the Cordova Plugins, it is best to use the version numbers, if not you will get the latest, and your code may break. This is because now, Phonegap Build now uses NPM for the plugins. And many times bugs fixes get into the plugin, that require the latest compiler - and Phonegap Build is always at least one version behind.
On 3., You'll need to use the whitelist to apply the fixes that maybe required for any new plugins you are using.
If you have more questions, I can answer them in comments. If it get too complicate, we can move to Google Group of Cordova/Phonegap - Best of Luck.

How to implement titanium/phonegap app with Wordpress with article and feedback creation?

I found that most sample codes are read-only in the app, without post creation and response functionality.
I would like to create a mobile app (with titanium or phonegap) with post creation and response functionalities.
Any idea on how to implement it? Or any sample code that shows this functionality?
If you are enough skilled you can use Apppresser ( http://apppresser.com - https://wordpress.org/plugins/apppresser/).
It is a framework that allows you to build your app in wordpress and publish it through PhoneGap. It allows also to integrate and use many PhoneGap libraries.
I used it on couple of project and it is great, but again, you have to be quite skilled because it is a framework and not a visual builder.
They also have lots of video tutorial in documentation section that can make your life easier.
The framework is free but there are some useful paid add ons. For a blog app free framework has all you need.
Hope this helps!

Jquery Mobile + Phonegap + Wordpress = Native App

I am currently planning to create a mood tracking application that will be able to run in different kinds of mobile platforms and I think Phonegap will be the best choice for that. But having no background in PHP coding and anything else with regards to database handling, I wanted to integrate Wordpress with my "native app". (So I could use various kinds of plugins to make my coding more easier) Is this possible? I've already read different kinds of articles and blogs but I want it to be straight forward as possible.
Thanks!
Use Wordpress as administration system on a Phonegap app is an easy way to have a great post system and widget options. But, if you have no background in PHP it's a little bit more complex...
To access to your WP datas, you'll need to write some PHP scripts that retrieve these datas to your application.
Take a look to this tutorial, I should help http://alexbachuk.com/wordpress-and-phonegap-part-1/
Good luck !

Resources