Google Play Store notice for PhoneGap apps

Recently, a number of users with AppStudio apps in the Google Play Store got this notification:

This is a notification that your {name of app), is built on a version of Apache Cordova that contains security vulnerabilities. This includes a high severity cross-application scripting (XAS) vulnerability. Under certain circumstances, vulnerable apps could be remotely exploited to steal sensitive information, such as user login credentials.

You should upgrade to Apache Cordova 3.5.1 or higher as soon as possible. For more information about the vulnerabilities, and for guidance on upgrading Apache Cordova, please see http://cordova.apache.org/ announcements/2014/08/04/android-351.html.

Please note, applications with vulnerabilities that expose users to risk of compromise may be considered “dangerous products” and subject to removal from Google Play.

To fix this, you have to update your project to use the current version of PhoneGap. Go into your Project Properties and edit ‘PhoneGap config.xml’. It will have a line like this – edit it to use Version 3.6.3 (or later – use the current version).

  "<preference name=\"phonegap-version\" value=\"3.6.3\" />",

You will then need to resubmit your app to PhoneGap Build. Use the resulting build to update your app in the Google Play Store.

Add cool stuff to AppStudio!

AppStudio comes with a lot of stuff built into it. But people are always inventing more: when we designed AppStudio, we made it extensible. Here is a general guide for adding cool features into AppStudio:

  1. JavaScript API: Look for a JavaScript API or library. If there is one, it will be fairly easy to use from AppStudio.
    http://blog.nsbasic.com/?p=703
  2. PhoneGap is used when the needed functionality is only in native code. Check first if there is an official PhoneGap plugin that does what you need. It’s good news if there is – you can use the relatively easy PhoneGap Build service from AppStudio’s Run menu.
    http://docs.phonegap.com/en/2.3.0/index.html
  3. Third party PhoneGap Plugin: These will work from AppStudio, but you will need to compile your app using the PhoneGap SDK. That means downloading and configuring the SDK for iOS and Android. Here are a couple of tech notes to get you started:
    iOS: http://wiki.nsbasic.com/Using_PhoneGap_to_create_an_iOS_App
    Android: http://wiki.nsbasic.com/Using_PhoneGap_to_create_an_Android_APK
  4. Write your own PhoneGap Plugin: If the above solutions don’t help, you’ll need to write your own plug in. You will need to use Java and the Android SDK for Android, Objective C and XCode for iOS.
    http://docs.phonegap.com/en/2.3.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guide

Let us know if you find something cool that works with AppStudio!

PS. If you need help developing a PhoneGap plugin, let us know. We can create plugins on a contract basis.

Use Dropbox to quickly install .apk files

Want a quick way to get an App Studio app compiled with PhoneGap onto your Android device? Use Dropbox!

  1. Build your app using PhoneGap as always.
  2. Put the resulting .apk file into your DropBox. (Get an account if you don’t already have one – it’s free!)
  3. Install the Dropbox app on your Android device if you have not done so already.
  4. Open Dropbox on the device and click on your .apk file. It will install!

(If you have not used Dropbox yet, it’s a great tool. It puts what looks like an ordinary folder on your PC or Mac desktop. You can share it with other users and computers: add a file to your Dropbox and your other computers can use it right away. There’s lots more, but this already is the simplest network share you have ever experienced. Installation is also very simple.)

A change to PhoneGap Splash Screens

PhoneGap have just made a breaking change to their Build process. The result is that splash screens no longer appear on Android devices. Luckily, the fix is easy.

In your Project Properties, open the configxml property. You’ll need to change this line:

<gap:splash src="{splashscreen}" gap:role="default" width="320" height="460"/>

to this

<gap:splash src="{splashscreen}"/>

The next build will make this the default for all new projects. However, you will need to modify on existing projects.

More info here:
https://build.phonegap.com/blog/enhanced-icon-and-splash-support

Building Native Apps

The enhancements in NS Basic/App Studio 1.3.1 make building native apps much easier. First, a bit of background: NS Basic/App Studio is designed to make Web Apps. These apps take advantage of the power of current browsers and HTML5 to make native appearing apps. With the speed improvements of JavaScript in recent years, they have excellent performance. Web Apps can also be compiled into Native Apps, which have their own advantages and disadvantages.

Under the Run menu, there is an option called “Build Native App”. Once you have tested your project, use this option to submit your app to the PhoneGap Build server. The compilers and SDKs to build native apps are large and complex: using a server to perform these operations saves you a lot of grief installing and maintaing them.

Once submitted, you can check the status of the build using “Get Native Build Status” under the Run menu.

Completed builds have their download links listed.

Some useful notes:

  • Each user of PhoneGap Build should have their own account. For demo purposes, NS Basic has a default account, but your files will not be secure there. It’s easy to sign up for your own. Once you have it, enter the information into “Deploy Options” under the Tools menu.
  • The program name and your icon will be taken from your project properties. Other PhoneGap options are set up in the configxml property in your project’s properties. Read more about using config.xml here.
  • iOS will not build until Apple’s signing information has been entered.
  • PhoneGap Build is in beta right now. PhoneGap may start charging for this service at a some point.

PhoneGap 1.0 released!

PhoneGap has announced that Version 1.0 is now available. The release puts the focus on accessing native device APIs, which is new ground for the web. Other improvements include:
* Overall API stability and “pluggable” architecture
* W3C DAP API compatibility
* Contacts API
* Remote debugging tools
Today’s release also includes a new unifying bridge interface that makes adding platforms and platform extensions easy. Plus, developers will be pleased to see that the plugin development process has been simplified.

PhoneGap lets NS Basic/App Studio users package their apps for iOS, Android and other app stores. It also gives them additional API functions.

The easiest way to make use of PhoneGap is with PhoneGap Build. There is also a tutorial on using PhoneGap Build.

Here are some other NS Basic + PhoneGap resources:

NS Basic/App Studio 1.1.1 Released!

NS Basic/App Studio 1.1.1 is ready to download. You can download it from the same URL as before.

Some of the most important changes are:
– Improved support for international languages: check the Arabic sample.
– New sample showing how to use PhoneGap to access contacts and camera.
– Ability to get the row and column when grid clicked.

Notes:

  1. Controls: Add image map tag to Image control.
  2. Controls: Grid now returns row, col on click.
  3. Deploy: <Doctype> changed to be HTML5 standard.
  4. Deploy: Blank lines in manifest no longer needed.
  5. Deploy: Make <body> min-height device aware.
  6. Docs: Technote 09 Using PhoneGap API added.
  7. Docs: Handbook and Language Reference updated.
  8. IDE: Fixed unicode in property values.
  9. IDE: Save always saves, regardless of dirty status.
  10. IDE: Added prompt for form deletion.
  11. IDE: Fixed selection problem in Form Editor.
  12. Language: New function GetLocale() added.
  13. Language: New function Log10() added.
  14. Language: VBNullString constant added.
  15. Samples: ComboBox shows how to get name of selected item
  16. Samples: PhoneGapAPI added.
  17. Samples: Tutorial2 and SQLSample2 fixed.
  18. Samples: New HelloWorldArabic
  19. Translator: /*….*/ treated as block comment.
  20. Translator: a.value=”” Or b.value=”” Or c.value=”” fixed.
  21. Translator: DateAdd past end of year fixed.
  22. Translator: Msgbox DatePart(“d”,Now) fixed.
  23. Translator: nStr(2,”12345″,”23″) fixed.
  24. Translator: REM (all by itself) fixed.
  25. Translator: Round(CDbl(“10”),2) fixed.
  26. Translator: x=5: Dim a(x) fixed.

NS Basic/App Studio and PhoneGap

The most important feature of NS Basic/App Studio 1.1 is support for PhoneGap.

PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. It takes your NS Basic/App Studio app and packages it so that it is acceptable for Apple’s App Store, Google’s Marketplace and other platforms.
It also provides additional API functions not found in NS Basic/App Studio.

Depending on platform, these can include:

  • Compass
  • Camera
  • Contacts
  • Files
  • System Information

PhoneGap is free.

Here are a couple of tutorials to help you get started.

Distributing apps using PhoneGap is much more complex than webapps. Android/PhoneGap has a complex installation procedure. While iOS is easier to get going, the 4+ gigabyte download and the complications of the App Store make it at least as complex an undertaking.

NS Basic/App Studio 1.1.0 Released!

NS Basic/App Studio 1.10.0 is ready to download. You can download it from the same URL as before.

The major new thing in this release is support for PhoneGap. There is a new setting in Project Properties, as well as 2 new Tech Notes. Have fun!

Notes:

  1. Support for PhoneGap added.
  2. PhoneGap API is now supported.
  3. IDE: New project property: phonegap
  4. Tutorials: New Tutorial 11: Using PhoneGap to create an iOS App
  5. Tutorials: New Tutorial 12: Using PhoneGap to create an Android App
  6. Code Window: case normalizes control names
  7. Controls: improvements to iMenu
  8. IDE: Now checks for duplicate control names
  9. IDE: Project explorer icons tweaked.
  10. Samples: Improvements to Geolocation, iMenu, getDate
  11. Translator: MsgBox 1 / (1 + 2011 mod 4) fixed.

Read the full release notes here:
http://www.nsbasic.com/app/info/Readme.htm