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”

Design Screen Now Features Rotation

There are two ways to handle users rotating their devices: prevent them from do so by using the orientation control or locking the screen, or make your app look good in both Portrait and Landscape.

One of the problems with making your app look good in both orientations was doing the layout for both in the Design Screen. AppStudio 5.1 solves that. Here’s how:
Continue reading “Design Screen Now Features Rotation”

Some thoughts on hosting services…

This is a guest post by long term NS BASIC user, Lee Church. He nails the reality of hosting services. When you are ready to deploy your app to the world, you’ll need one.

Some thoughts about hosting services and errors:

  1. The barrier to entry to create a new business and call it a hosting service is under $100.
  2. With the proliferation of services like AWS (Amazon Web Services) you need only one PC on your desk to manage the hosting.
  3. You can hire some guy in India to “manage” the “service” for $10 per hour.
  4. Web hosting is like so much in the computer business: 99% of the “stuff” is automatic and handled by software, but the remaining 1% is where experience and knowledge pay off. You don’t get much experience and knowledge from the $10 per hour guy.
  5. The best defense is always “It’s the other guy’s fault”.

This is not a recipe for quality and good service.

If you’re new to this environment, understand that the hosting site is a critical part of the process and your app. The best app in the world will fail miserably on a hosting site not set up properly. If you are not familiar with Web issues and servers, find a friend or consultant to help. You cannot take the hosting site’s response to problems at face value.

Got a hosting service that has worked well for you? Let us know, and we’ll set up a list here.

Hosting Services

  • http://www.lunarpages.com: “They are reasonable and very helpful whenever I have had a problem.” — Helen Sandoz
  • Pair.com: Provides fully configured servers starting at $5.95/month.
  • tsohost.com: I’ve been using www.tsohost.co.uk for years and they have excellent support and very good value packages starting from £15 per year! — Roger Mepham

blag

Responsive Design: Rotating Your Device

When designing an app for mobile devices, you need to consider what happens if the device is rotated. You can just put up a message asked the user to rotate back, or you can design your app so it looks good in both portrait and landscape modes.

AppStudio 5 introduced Responsive Web Design as a way to layout your forms. RWD is a design approach for making apps size themselves to varying sizes of screens.

In this blog post, we’ll use Responsive Design to handle rotation in a simple layout with three buttons. The techniques can be used for much more complex layouts, of course.
Continue reading “Responsive Design: Rotating Your Device”