And we’re not talking about the food! But Tools for Apache Cordova.

I love Visual Studio 2015, and I’ve always used it for development in ASP.NET (C#), but I’ve made Apps for iOS in Xcode previously and used the likes of Brackets and Visual Studio Code on my Mac to write Cordova Apps.

So I decided to actually write it on Windows! Seems a bit weird to write something for Apple on Windows, but it’s more of a Cross-platform thing! Now as I’ve only ever previously written for Apple and only just recently converted an existing Cordova App geared for iOS and utilising a plugin written for iOS to Android, including re-writting the custom plugin in Java, which again I used to hate, but amazing once you start actually really using a language you start to like features, and I have to say that of Android. The more and more I use it, the more I like it, but you will still never move me away from my iPhone!!

But, writing an App in Windows using Android is great, Visual Studio compiles it all up, i.e. executes cordova run android! and happily runs in the Visual Studio Emulator or on a phone plugged in. So I wrote my new app for Android first (against every bone in my body!) and once it work started looking at all the amount of extra bits you have to put here and there for it to work on both Android and iOS, it’s just a nightmare! But I suppose it’s easier than writing 2 Apps! But silly things like iOS will only record in .WAV, whilst some Androids can record in .MP3 but all can record in .AMR, then Windows uses it’s own .WMA! So just making sure the extension on the file name is correct between the 3 platforms, not to mention “Documents” is not the same location on all, and doesn’t exist on all!

So, you go through and make the tweaks and then think, how do I compile this then? Well that’s where Remote Build Tools for TACO come in. Simply install it on a Mac with Xcode installed, and make sure Xcode has been setup to your account, then run remotebuild and the first run will give you a setup code to put into the Options in Visual Studio.

Then, you have a choice! Plug your iPhone into the Mac that has the remote build tools installed on, or plug your iPhone into your Windows PC, and make sure you have iTunes installed on it. Then you can compile, run and debug (AWESOME!) an App on an iPhone in Windows. How Cool is that!

But, I did run into a few issues recently and here are my solutions!

Cordova 6.1.0 does not work with TACO on iOS 🙁 Whilst it adds the Plug-ins, the project gets renamed to HelloCordova and therefore fails.

Simple solution, don’t use Cordova 6.x.x with TACO on iOS, use 5.4.1, until better support, and apparently, 2 days ago a new Visual Studio 2015 update apparently resolves this issue, but I have yet to check.

1st build on iOS runs fine, but subsequent builds fail with unrecognised token (a random letter).

Again, this is a strange one, after remotebuild builds the App it then transmits it back to Visual Studio, but for some strange reason the file remote_ios in the plugins direction always gets corrupt. So simply delete it! It will happily rebuild again, you can also copy and paste the ios file and rename it to remote_ios.

Other than that, it’s been a dream writing a cross-platform app in Visual Studio. The support in Visual Studio Code is apparently getting better, so I may check that out one of the days, but I like Visual Studio, been using it since day dot of .net and previously for good old Visual Basic, so if it ain’t broke, don’t fix it! So I’ll be continuing to us Visual Studio for many moons to come!

But, PTR Systems’ first app by myself and Richard Cooper is live on the Google Play Store, and is waiting for Review on iOS. But for those who are interested, check out prenatool.com, but like all my sites! It’s still under construction!!

%d bloggers like this: