App does not work with lower iOS version in XCode

Sometimes we find this very annoying that the new App is working only for some specific iOS version and not working for others. This a very common issues faced by many.

In this case, two things that you can do here :

  • Deployment target to the minimum version you support
  • MinimumOSVersion key value in Info.plist file


Setting target version in XCode

Setting target version in XCode

Posted in General Tagged with: ,

Mocking a property in a class using spyOn in JavaScript unit Tests

So many times, I have struggled to mock a property on a class in JavaScript and have found it very difficult to locate some precise examples. So here is the go. We can use the Object.defineProperty method to mock a property on any given class and can mock its value for our tests. See below:

Object.defineProperty(myClassName, ‘myPropertyName’, { value: mock, configurable: true, enumerable: true, writable: true });


Here it assumes you have a class called “myClassName” in which you want to mock the property called “myPropertyName”. Just use the key-value pair to suit your needs and if it is going to be configurable in your use cases, make configurable : true.

In my case, I used something like :

Object.defineProperty(truthTakers.localNews, ‘maxLocalNewsSize’, { value: 25 });


Happy coding

Posted in Development Tagged with:

Truth Takers App is here !

The iOS app for news related to Nawanshahr (Shaeed Bhagat Singh Nagar) Punjab (India) is available at iTunes now. Download and get connected to your city guys.

See it in action here :




Posted in General

Showing JavaScript popup without Title

var iframe = document.createElement(“IFRAME”);
iframe.setAttribute(“src”, ‘data:text/plain,’);
window.frames[0].window.alert(‘No network coverage detected. Please check your network connection and try again.’);


Posted in Development Tagged with:

SPAM email and sms against gumtree adverts

Just to inform everybody, please don’t reply to any SMS text saying reply me at my personal email with firm price. These are the spammers who use some WebApp to send SMS text and then get you in some BS mentioning I am in New Zealand or Darwin etc. Give me your paypal or pay for the insurance.

Don’t reply back or try to contact these morons.
Some email addresses they are using :


I will update the list as soon as i get anymore.

Posted in General Tagged with: ,

Me on Stackoverflow

Spread the word