Evothings Studio 2.2 release imminent

Göran KrampeBlogs, News

build
Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

The new upcoming 2.2.0 November release of Evothings Studio consists mainly of work we have done during both September and October, in order to add build support since our surveys, as well as other discussions with many of our skilled users, have shown that this step is missed in producing a working app.

We feel we have come up with a good first approach to tackle this – and while we can only build for Android right now (iOS comes next), all our examples build fine out-of-the-box and you can build on Windows, MacOS or Linux. In addition to the Build button we have also made several other improvements and fixed a bunch of issues, making this the best release so far!

Can’t wait to try it out? Download the 2.2.0 beta7 release from our (not so) secret repo, why not while you’re reading this.

You now have a Build button

buildThe big, new feature in 2.2.0 is the automated build process where the Studio can produce an Android apk file for your application. At the time of writing this works for all our included examples and we are working on smoothing this procedure as much as we can to make it trivially simple to build. Our feeling is that it already is quite simple, but we can always improve!

The idea is simple, yet quite compelling. Instead of forcing the user to set up, configure and maintain a local, complex Cordova build environment — which can introduce all sorts of uncertainty — we decided to use a local virtual build environment instead. This way we can ensure this environment works and is the same for all users of the Studio, regardless if you are on Windows, MacOS or Linux. This is an interesting alternative to cloud build services. We get the same strict control over the build environment, while in contrast to most cloud solutions, it’s completely free and gives the user full control over the build process.

How Build works

The Studio uses VirtualBox and Vagrant to drive this feature, which have become de facto standard tools for virtualizing development environments. The Studio guides you how to install these two tools, and they are both very easy to download and install.

Using these tools the Studio proceeds to download a Vagrant “box”, a packaged virtual machine, and starts it up running headlessly in a sub-directory to MyApps called “build”. Everything is automatic and all progress can be followed through a new, shiny Build tab in the Studio.

The virtual machine is running Ubuntu Linux (version 16.04 LTS) preloaded with all the tools needed to perform the build. The actual build is a fully clean “out-of-tree” build which means that all source files for your app are copied into a separate directory under the “build” directory. The Cordova configuration and the following actual build takes place there, outside of your own sources. It also means we configure and build everything from scratch every time, this is by design to make sure we get a clean and robust build with as few problems as possible.

vagrant-virtualbox-ubuntu-post-title

In upcoming releases, we will improve on this feature even more with a choice of build environments (like for example, different version of Cordova) but also offering even more control so that you can adapt and tinker with the build(s) while keeping everything mostly automated. We may also introduce the ability to build locally inside the source tree, and to build incrementally. And of course, we also aim to be able to build for iOS using the same mechanism. More on that later! Any and all feedback on this new functionality is greatly appreciated.

News tab

The new News tab gives the user interesting (hopefully!) news from the Evothings realm, but is also the basis for a chronological log of work being done in the Studio. In an upcoming release, we aim to weave together certain “developer events” in this view, for example finished builds or other interesting things happening during development. Currently this tab loads a special news feed from our site. And of course it also gives us a less intrusive, less spammy way to inform of new releases or other noteworthy things :)

HTTP vs HTTPS when calling external services

We have seen a lot of people getting bit by the consequences of Evothings Viewer securely loading your app using HTTPS from our cloud proxy servers. We originally moved to HTTPS in order to do the “Right Thing” security wise, but we did not fully anticipate how often our users (including ourselves!) would have problems due to this tighter security.

The problem is, that if you load an app using HTTPS, it is not allowed to connect to other internet servers using plain HTTP – since that would violate the security ruleset dictated in the browser engine’s sand box – and in fact, even if you use HTTPS it may still not work due to the strict requirements of fully proper certificates. Self signed certificates will not suffice, and to make things even worse, you do not get any reasonable error message from the web view about the issue at hand.

Our solution to this is that if you experience problems, you can now trivially just open settings and switch to plain HTTP. If your app then suddenly works fine – you have verified that you are indeed being bitten by this (and it’s not something else) and you can continue working knowing that you are not fully secure, but now you at least know where to look for the issue. Many services out there serve over both HTTP and HTTPS, and just by changing the URI scheme to https:// or vice versa, it can many times resolve just like so.

App Configuration

configThe configuration dialog (called Edit earlier) now has several new fields and better validations of values, in order to satisfy the demands from the new Build process. This includes app title, app cordova id and long description.

Author name, email and URL were added and they will pick their default values from the corresponding settings fields.

The version field is now verified to be in semantic versioning style, see semver.org. We feel it’s worth enforcing that. The Cordova id field is populated with a default value, and also verified to be in proper format to work with the Build. In addition to adding js Libraries you can now also check what plugins your app needs, the list of available plugins are the ones that we include in our viewer. We will soon also enable adding extra plugins in addition to those we list.

More button

moreIn order to reduce UI clutter we added a new More button to show an extra button row for more actions you can perform on your apps in MyApps.
Since you may also want to copy your own app in order to make a new one, we added the Copy button to MyApps also. Finally we renamed Edit button to Config and Code button to Files which are more reasonable names.

Edit button

editTo make it easier to launch your preferred editor to edit source code we decided to finally add an Edit button that by default launches VSCode on the proper file or directory of the app.

We also added a setting so that you can change the editor command to something else than VSCode, like for example Atom or Sublime.

New settings

As mentioned already, there are now three new settings for default values of Author name, email and URL. These values are filled into the evothings.json file of an app when it is created.

There is a new setting “Cordova prefix” that is used for auto-generate a Cordova id for your app, you should ideally set it to the reverse domain of your organization. The Studio will then combine this prefix with a derivative of the app name to produce a valid Cordova id.

There is a new setting “Editor command” that is executed when you press the Edit button. The default value is “code” which starts Visual Studio Code. The argument is either the directory of your app, or the index.html file of your app.

For app signing there are seven (7) new settings. That may sound a lot, but you do not need to change most of them. We just wanted to make sure you have full control. You should edit the field Keystore distinguished name to properly reflect your identity. But the fields “Keystore filename”, “Keystore create command”, “Jarsigner sign command”, “Jarsigner verify command” can remain unchanged as they are.

The two password fields, “Keystore password” and “Key password” can optionally be filled in. If you build in Debug mode, they’re not read in. If they are filled in, then the Studio will use them when creating a new keystore, or when signing an app. It’s however more secure to not store them as settings and instead enter them manually once per session, the Studio will ask for them in the Build dialog.

There is also a setting “Full path to VBoxManage.exe on Windows” but this is only to be used on Windows if the Studio fails to detect Virtualbox after you have installed it.

Libraries

We added install.js/uninstall.js hooks in Libraries for custom installation logic into the app. And we added a field download-url to Library evothings.json so that Libraries can be hosted also in third party locations.

Installers

We have also added rpm and AppImage formats for Linux, an NSIS installer for Windows (as an option to the Squirrel installer) and also a 32 bit build for Windows. The MacOS dmg is also less ugly looking. :)

The electron-builder and electron-packager packages were updated, while we needed to update electron only modestly to version 1.2.6 since we otherwise hit a known issue: #7351.

Noteworthy issues fixed

  • Fixed issue with finding the correct user folder path trying to mitigate issues some users have experienced when running on Windows in a networked environment.
  • Fixed issue with feedback menu link under Help to be non private so that it now actually works.
  • Fixed issue #187 where MyApps directory was not properly created.
  • Fixed issue #186 with copied apps accidentally having the same UUID, the Studio now detects and offers to fix it.
  • Fixed issue #182 where duplicate evothings.json files were accidentally created.
  • Fixed issue #159 so that we only use port 443 (HTTPS) to communicate with our cloud.