Mobile Strategy: KarValue is an Apache Cordova Multi-platform (iOS, Android and Windows 10) App

KarValue is an Apache Cordova Multi-platform Mobile App to Check Car Prices! KarValue is built using Visual Studio 2015 Cordova template with Angularjs and jQuery. Built from same codes but deployed on multiple platforms (Windows 10, Android and iOS). One development cost and one development skills- saves you development and maintenance costs for your organization. Checkout at the respective app store-

Windows: https://www.microsoft.com/en-us/store/apps/karvalue/9nblggh5whdq

Android: https://play.google.com/store/apps/details?id=com.aspnet4you.KarValue

iOS: https://itunes.apple.com/us/app/karvalue/id1094557802?ls=1&mt=8

KarValue

 

 

 

 

 

 

 

 

 

 

Technologies Used:

  • Visual Studio 2015 Enterprise (Visual Studio Community can be used)
  • Cordova (v6.0)
  • Angularjs 1.x (v1.4.3)
  • jQuery (v2.2.0)
  • ui-bootstrap
  • TypeScript
  • Microsoft TFS/Gits for Source Control
  • Android: Java JDK, ANT, Android SDK, Google Android Emulator
  • iOS: VMware Workstation Player 12 to host OS X El Capitan, xCode (building and deployment), Application Loader (deployment)
  • Plugins: SplashScreen, WhiteList, GeoLocation
  • NOT using ionic framework (used initially but removed the dependency)- simple is better!
  • Vehicle API @ Edmunds.com: That’s were app is getting all the vehicle and pricing data.
  • Geolocation API @ Google.com: Geolocation api is used to calculate zipcode from Latitude/Longitude.

Why Cordova?

You have so many options to pick technologies but why I choose Cordova?

  • Number one differentiator is Cordova’s ability to support multiple platforms (namely iOS, Android and Windows) from same code base.
  • One code base means- one development and one maintenance cost. The end result is- you save money in long run.
  • Reuse of Human Capital (people with C# skills) and familiar tools (Visual Studio)- if you are a Microsoft technology shop.
  • You still can make use of Native functions (through available Plug-ins).

My #1 choice was VS 2015 with Xamarin but there is a cost and I am not ready to pay for Xamarin (at this time). So, I am patiently waiting for Microsoft’s next move on Xamarin’s licencing. Hopefully, I would be building this app in VS 2015 with Xamarin in near future. Now that Xamarin is owned by Microsoft, I am hoping Microsoft would make Xamarin for free (or least costly) to entice lot of developers to build Windows app!

There are so many technologies used, as you can see in the above laundry list, and you can imagine so many piecemealing is done by Visual Studio behind the scene. It was a bit of learning curve as I have given up the UI work long ago but I am happy to see my first app in action on all three platforms. It’s not so much what the app does in terms of functionalities and it is primarily used to prove the already proven concept. 🙂 I plan to share the project in public GitHub once I am done with the cleanups.

You have no choice but to have a Mac to be able to build and deploy iOS app. Yes, you can build right from Visual Studio but you have to connect to Mac and have the remotebuild agent running there! It works but I have had some issues. So, I downloaded xCode on Mac and used xCode to build. You need xCode for many things including setting up profile and singing keys and xCode is nicely integrated with other Apple products. iTunesconnect.apple.com is where you would upload your iOS app but you do need xCode or Application Loader to upload the packages app!

Geolocation Plugins: It works perfectly on Windows and Android but I could not make it working on iOS (9x). Geolocation plugin was causing high CPU on iOS and I ended up removing the feature from iOS. It may come back to iOS once I am able to find what’s causing the cpu to spike.

Packaging:

Your best guide is to start at https://taco.visualstudio.com/en-us/docs/tutorial-package-publish-readme/ as Microsoft is continuously updating the process. I followed the steps defined in the documentation to package and deploy in Windows and Android.

I encountered issues with iOS build (device and remote device) from Visual Studio. So, I moved to xCode to package and deploy from Mac. I had no idea how to use XCODE as I never used it. Visual Studio does wonderful job by outputting the platform specific contents under platforms folder. I copied all folders and files from  iOS folder to a folder on the Mac. KarValue.xcodeproj was there my folder root and I just opened it from XCODE! XCODE would flag warnings and I was able to follow thorough the suggestions. I deployed the app to my iPhone 5 and test the app on the phone. In addition, I tested the app on other iOS device simulators. Finally, packaged the app (Archive under Product menu) in XCODE. My attempt to deploy the build using XCODE hanged on authentication step. So, I moved to use Application Loader. It was complaining about missing icon.png even when the icon file was in the asset folder. I did not need the icon reference in the xcodeproj and I simply dropped it from the xcodeproj. Repackaged the app in XCode, exported it and loaded in Application Loader. That’s it! I was able to upload the build- finally. Created an app record in iTunesconnect.apple.com which is where you would submit your app. Yea, you are going to have to spend some time to resize images to comply with different screen sizes before you can add them on iTunes. You can find the screen size specifications at iTunes Connect App Properties. I took a screenshot from iPhone 6S Simulator and used image editor (paint will work) to resize the images for different screen sizes! You can upload the build from XCode and/or Application Loader and it would show up in iTunesconnect (if all goes right). As I said, Apple’s packaging is most complicated but I don’t mind if it is for ensuring good quality. It takes few days for Apple to review the submission.

 

Special Credits: Vehicle API @ Edmunds.com, Geolocation API @ Google.com. Images @Superb Wallpapers.

© 2016 http://www.aspnet4you.com.