AppStudio 7.4.2 released!

We’re pleased to announce that 7.4.2 has been released.

Late on July 29th, PhoneGap Build announced that version cli-9.0.0 is available. This is good news: As of August 1, the Google Play Store will require that all new apps are built using cli-9.0.0. Existing apps have till Nov 1, 2019.

This release updates AppStudio to handle the changes to PhoneGap Build. See this blog post for more info:
https://blog.appstudio.dev/2019/07/phonegap-build-updates-to-cli-9-0-0/

Here’s what is new and fixed in the new release:

  1. PhoneGap: If phoneGapVersion not specified, defaults to cli-9.0.0
  2. PhoneGap Samples: All samples are now compatible with cli-9.0.0

The easiest way to get the update is on the Help menu – “Check for Updates…”

PhoneGap Build Updates to cli-9.0.0

Late on July 29th, PhoneGap Build announced that version cli-9.0.0 is available. This is good news: As of August 1, the Google Play Store will require that all new apps are built using cli-9.0.0. Existing apps have till Nov 1, 2019.

The PhoneGap Build Version tells PGB which libraries use when building apps. cli-9.0.0 includes Android API Level 28, which is required for Android 9.0, so it makes sense to build apps using this new version.

What it means for you
Continue reading “PhoneGap Build Updates to cli-9.0.0”

Receiving SMS messages into your app (Android)

You can now receive incoming SMS messages (text messages) on Android devices, using the sms-receive plugin.

It does not intercept them – the messages still go to the Messages app. It only works if your app is compiled under PhoneGap.

Your app doesn’t have to be in the foreground – it will received the messages so long as it has been started. The received message is available as variable in your app – so you can use it to update databases, inform the user or all kinds of things.

Full details are in this Tech Note:
https://wiki.nsbasic.com/Using_the_PhoneGap_API:_SMS-Receive

Using the Safari View Controller with PhoneGap

To be approved in the iTunes Store, Apple may require that your app open web pages inside your app, instead of opening Safari externally in another app window. It provides a better experience to the user.

When you open Safari in a new app window, it’s difficult to get back to your app. By using the Safari View Controller inside your app, switching to Safari is seamless – there is even a Done button to return to your app. Your users will thank you.

Title bar of a Safari View Controller. Note the Done button and the customized color.

There’s a handy PhoneGap plugin which makes this easy. Here’s how to use it:
Continue reading “Using the Safari View Controller with PhoneGap”

PhoneGap: Don’t overwrite the iOS Status Bar

If you’ve created a PhoneGap version of your project, the top of your screen might look like this on iOS:
Screen Shot 2016-04-26 at 11.36.57 AM

See how the title of the screen (“Volt”) is crowded into the status bar?

It’s easy to fix this. Add the following lines into configxml in Project Properties (PhoneGap section):

<plugin name="cordova-plugin-statusbar" source="npm" />
  <preference name="StatusBarOverlaysWebView" value="false" />
  <preference name="StatusBarBackgroundColor" value="#000000" />
  <preference name="StatusBarStyle" value="lightcontent" />

Your app will now look like this:
Screen Shot 2016-04-26 at 11.36.37 AM

With the StatusBar plugin installed, you have a bunch of additional options for managing the status bar. See the full documentation here.

PhoneGap: Getting rid of the Content-Security-Policy warning

I was messing around with a PhoneGap app using the Chrome Debugger’s Inspect feature, which lets me examine a running PhoneGap app for error messages, source code, elements, etc. I noticed an error message in the console I hadn’t seen before:

No Content-Security-Policy meta tag found. Please add one 
when using the cordova-plugin-whitelist plugin.

Continue reading “PhoneGap: Getting rid of the Content-Security-Policy warning”

PhoneGap: Change to configxml for SplashScreens

(This blog posted was updated with additional information on Oct 23, 2015, Thanks, Vagner!)

The recent updates to PhoneGap have resulted in another change being needed to your configxml.

In Project Properties, add these lines anywhere in the middle of PhoneGap configxml:

<gap:plugin name="cordova-plugin-splashscreen" source="npm" />
<preference name="AutoHideSplashScreen" value="true" />

Without this, your splashscreens will not appear.

PhoneGap: Important change to configxml WhiteList

If your PhoneGap app accesses external websites, there is an important change you need to make to your configxml Project Property.

Make the the following lines are in your configxml:

<gap:plugin name="cordova-plugin-whitelist" source="npm" />
<allow-navigation href="*" />
<access origin="*" />

The change seems to be a result of PhoneGap switching to npm to store its plugins. Be sure to read this blog post for more information on the change.

Edited 05/18/2016: Added allow-navigation line. It’s recommended that the href argument be as specific as possible. More information here: https://www.npmjs.com/package/cordova-plugin-whitelist

PhoneGap Build: iOS 9 support delayed

The PhoneGap team posted the following to their blog yesterday:

iOS 9 is not officially supported yet, and there are some known issues. The Cordova open-source project team is hard at work on Cordova iOS 4.0, which will include iOS 9 support. For loads of helpful Cordova iOS news, keep an eye on Shazron’s blog, as well as the Apache Cordova blog.

Some of the problems notes by users on the PhoneGap Build Support forum are:

  • Scaling is wrong – elements are the wrong size.
  • System bars are wrong size.
  • In app browser issues

In the meantime, PhoneGap advises using the latest version (if you don’t specify “phonegap-version” configxml, the latest version will always be used) and to use the npm plugins (see this blog post!)

PhoneGap Build: npm plugins

PhoneGap Build is changing how they organize their plugins. You will need to make some changes to configxml in Project Properties as a result.

For each PhoneGap plugin you use, you need to add a line to configxml which declares the name of the plugin. PhoneGap Build can then add it to your app. These used to be saved in a folder on PhoneGap’s servers: they are now stored in an npm repository.
Continue reading “PhoneGap Build: npm plugins”