Answers.Body: <p>You can't actually use server side scripting within PhoneGap</p>
  <blockquote>
  <p>Q: CAN YOU USE PHP/ASP/JSF/JAVA/.NET WITH PHONEGAP?</p>
  <p>A: A PhoneGap application may only use HTML, CSS, and JavaScript. However, you can make use of network protocols (XmlHTTPRequest, Web Sockets, etc) to easily communicate with backend services written in any language. This allows your PhoneGap app to remotely access existing business processes while the device is connected to the Internet.</p>
  </blockquote>
  <p>So in answer to wrapping a Craft CMS within Phonegap, I'd say it's not possible. However you can always use the <a href="https://github.com/pixelandtonic/ElementAPI" rel="nofollow noreferrer">ElementApi Plugin</a> by P&amp;T to create endpoints on your Craft website that exposes content.</p>
  <p>Then you could just create a client in HTML/JS (VueJS/Angular/jQuery/Ember) to query these endpoints and show the content on your app.</p>
  <p>This approach has a wealth of benefits as it means you only need to have one backend (Craft install) that could serve multiple Clients (PhoneGap apps) and when you update content on Craft it will cascade through your apps in realtime (minus any caching you may have)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-17T11:39:15.637Z
Answers.LastActivityDate: 2016-11-17T11:39:15.637Z
Answers.LastEditDate: 2020-06-17T08:56:27.903Z
Answers.UserDisplayName: Alec Ritson
Answers.Body: <p>Several people are using Craft to power apps.</p>
  
  <p>Here's a good hangout: <a href="https://straightupcraft.com/events/craft-powered-apps" rel="nofollow noreferrer">Craft Powered Apps</a>, with Aaron Berkowitz discussing how PBS Kids uses Craft to power multiple apps, by making the data in Craft available to the apps available via a JSON API. I believe they use Cordova, which runs independently of Craft but grabs all the data for the app via the API.</p>
  
  <p>Aaron also discusses how publishing content via Craft helps them get around some app-update requirements.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-17T10:19:13.907Z
Answers.LastActivityDate: 2016-11-17T15:40:48.397Z
Answers.LastEditDate: 2016-11-17T15:40:48.397Z
Answers.UserDisplayName: Ben Parizek
Body: <p>Has anyone used Craft to manage content within a Cordova/PhoneGap app?  How successful was it? What are the pitfalls?</p>
  
  <p>We have an idea to create a website managed by Craft CMS.  We then want to "wrap" the website in Cordova/PhoneGap so we can make it available as an App. Our immediate questions:</p>
  
  <p>• Is it possible?</p>
  
  <p>• Is the App immediately updated as a website would be or are there further steps?</p>
  
  <p>• Are there any issues to look out for?</p>
  
  <p>Many thanks for any advice.</p>
  
  <p>Martin</p>
  
Tags: <app>
Title: Using Craft CMS to manage content within an app
ThreadText: # Using Craft CMS to manage content within an app
  
  (Asked by: username_0 on 2016-11-17)
  
  Has anyone used Craft to manage content within a Cordova/PhoneGap app? How successful was it? What are the pitfalls?
  
  We have an idea to create a website managed by Craft CMS. We then want to "wrap" the website in Cordova/PhoneGap so we can make it available as an App. Our immediate questions:
  
  • Is it possible?
  
  • Is the App immediately updated as a website would be or are there further steps?
  
  • Are there any issues to look out for?
  
  Many thanks for any advice.
  
  username_0
  
  **Tags:** app
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-11-17. Score: 4 | Accepted answer
  
  Several people are using Craft to power apps.
  
  Here's a good hangout: [Craft Powered Apps](https://straightupcraft.com/events/craft-powered-apps), with Aaron Berkowitz discussing how PBS Kids uses Craft to power multiple apps, by making the data in Craft available to the apps available via a JSON API. I believe they use Cordova, which runs independently of Craft but grabs all the data for the app via the API.
  
  Aaron also discusses how publishing content via Craft helps them get around some app-update requirements.
  
  
  ---
  
  ### Answer by username_1 on 2016-11-17. Score: 3
  
  You can't actually use server side scripting within PhoneGap
  
  > Q: CAN YOU USE PHP/ASP/JSF/JAVA/.NET WITH PHONEGAP?
  >
  > A: A PhoneGap application may only use HTML, CSS, and JavaScript. However, you can make use of network protocols (XmlHTTPRequest, Web Sockets, etc) to easily communicate with backend services written in any language. This allows your PhoneGap app to remotely access existing business processes while the device is connected to the Internet.
  
  So in answer to wrapping a Craft CMS within Phonegap, I'd say it's not possible. However you can always use the [ElementApi Plugin](https://github.com/pixelandtonic/ElementAPI) by P&T to create endpoints on your Craft website that exposes content.
  
  Then you could just create a client in HTML/JS (VueJS/Angular/jQuery/Ember) to query these endpoints and show the content on your app.
  
  This approach has a wealth of benefits as it means you only need to have one backend (Craft install) that could serve multiple Clients (PhoneGap apps) and when you update content on Craft it will cascade through your apps in realtime (minus any caching you may have)
  
  
  ---
  
  