Compile Cordova App for iOS

I recently planned to compile my Phaser games for iOS App Store. These games were build using Cordova CLI and have already been published on Android Store so I already have a functioning game which was to be ported to iOS. I decided to document the steps I had to follow to get my game compiled and published to iOS App Store. You can develop the game on any platform of your liking but in order to compile and publish these games to iOS App Store you do need to have a Mac. It can not be done from Windows or any other platform. Steps to compile the game: Download MacOS installer for Node.js and install it on your Mac. Go to App Store on your Mac and install latest version of XCode. You need XCode to build the game. Open Terminal console (Finder -> Applications ->Utilities) on your MacOS and install cordova using npm utility of Node.js by[…]

Cordova iOS Mobile App displays White Background Color after Splash Screen

Cordova Mobile apps display a white background right after Splash screen. This happens because WebView is loaded before our app is initialized. I tried many suggestions such as setting AutoHideSplashScreen to false and then call navigator.splashscreen.hide() in deviceready function which did not work for me. It gets called before WebView is even loaded. After trying a lot of things I finally had to look into the main view controller code which is automatically generated by Cordova (I am using Cordova 8.0.0). Go to MainViewController.m file in the platforms/ios/CordovaLib/Classes folder and look for following code

Add the lines highlighted as below. I used a transparent Splash screen (which gives black background while splash screen is shown) and changed the background color of the WebView to the color which matched with my app’s background color.

Now background color doesn’t transition from black to white to the app background which looked bad earlier. Now when I open app on my iOS[…]

Phaser Cordova Mobile App Crashing on iOS

I recently decided to compile Phaser games to iOS and publish to The App Store. The games were already published on Google Play Store for Android and worked without any issues. I faced few issues after compiling Phaser games for iOS. The first issue which I faced was the game crashing randomly on iOS. After doing further research I found this article on Intel XDK forum which turned out to be the reason for crash. The games were written a while back with older versions of Phaser and I did not get time to upgrade and test this with newer versions of Phaser (CE and higher) so I decided to try the fix specified in this thread and voila, it worked just fine. Here is the code which I borrowed from the thread

 

Best Shared Hosting

Hosting services can ruin Google ranking, learn why?

Learn Why Bad Hosting Can Ruin Your Google Rankings Everybody knows that Google have over 200 factors that go into their algorithm of website ranking. Nobody (except Google) knows what exactly those factors are, however, SEO specialists have picked out some really important ones, the effect of which can be measured. When you are done with your website’s design, content, quality internal and external links, heading and title tags, keywords, and everything that depends on the web developer (programmer code and databases optimization), you are ready for the last step – uploading your website on the server and publishing it for the whole wide world to see. If you are looking for reliable shared hosting under 1 USD click here > SEO experts recommend choosing your hosting carefully as all the hard work done while building your website may be ruined instantly by uploading the site on an inappropriate hosting. […]

Quick Tip

Send Email from GoDaddy Asp.Net Application

In my previous article we looked at how to use Google account and SMTP server to programatically send mail to an email address. We can use the same code with minor changes for GoDaddy application which is using shared hosting. We will develop a “Contact us” page here using SMTP server from GoDaddy. The first step is to create a web service

The app settings are as following

The HTML page code for the contact us page is as following

Now add the java script code as following in our HTML

The complete code can be downloaded from here. Be aware that if you are setting email address entered by the user in the “from” address while sending the email, it may end up in SPAM folder of your mailbox. Alternatively you can use “from” and “to”addresses from your application domain itself and append user’s email address in the mail[…]

Quick Tip

Send Email from Asp.Net Application using Google Account and SMTP

In order to send mail from the application we can use SMTP server from Google (which off course has certain limitations). We can use a Google mail account and send the mail using SMTP server from Google. This works very well for Asp.net applications which need to use a simple form such as “Contact Us”. An example of this is explained below. We will use AJAX to send the request to an ASP.Net web service which sends the mail from the server side. Create a web service as following

In order for the method to be called using AJAX make sure to uncomment [System.Web.Script.Services.ScriptService] in the web service code. Add following appsettings in web.config

Change values and replace email and password to your account credentials. Leave SMTPhost and port as-is. We will now create a simple HTML page to input the data

Now the last piece is[…]