Disable a IBAction (id) sender button programatically in Xcode while developing app for iOS & OSX

While developing apps for OSX or iOS you will be wondering how to disable IBAction button programatically.

 
Here is how to do it.

 

Assumption: I assume you are using Storyboards for developing your apps within Xcode.

 
Step 01: Drag UIButton (iOS) or NSButton (OSX) on Storyboard. I Also assume that you have dragged three buttons on storyboard & you have named it as Start, Pause & Reset.

(more…)

Continue Reading Post

How to programmatically set image to UIImageView or NSImageView in Xcode?

Here is how to programmatically set image to UIImageView in Xcode,

 
Step 01: In your Xcode project in storyboard drag UIImageView from object library (located at Xcode right utilities sidebar). Give it definite size & now note down it’s size on paper to create same size image in you choice of image editor.

 
Step 02: Connect UIImageView to respective header file with name e.g. imageView

 
Your code will look something like this:

(more…)

Continue Reading Post

Here is how to set the text in an NSTextField programatically in Xcode while developing applications for OSX?

Here is step wise how to set text in NSTextField programatically,

 
First,
If you are using storyboards for app development.
Connect button storyboard to code class file i.e. .h header & .m method file or incase of swift class file of source code

 
Second,
Let assume that you have connected your NSTextField / Label as:

 

@property (nonatomic, assign) IBOutlet NSTextField *namedTextField;

 
Third,
So you will use dot operator called .stringValue & Here is how it can be done two ways:

(more…)

Continue Reading Post

How to Fix Xcode Organiser error, ‘ERROR ITMS-4238: “Redundant Binary Upload. There already exists a binary upload with build version ‘1.0.1’ for train ‘ 1.0.1’” at SoftwareAssets/PreReleaseSoftwareAsset’

With updated new iTunesConnect for Apple Developers comes with many features one which is prerelease or TestFlights for External Testers. It allows App Developer to distribute it’s unreleased app to selected beta testers so that developer can get reviews & bug reports from them. One of this feature is that you can upload multiple copies of same app to iTunesConnect i.e. ITC.

 
When you try to do that you get following error

 
xcode organiser ERROR ITMS-4238 Redundant Binary Upload. There already exists a binary upload with build version

(more…)

Continue Reading Post

How to fix Xcode error ‘Unable to boot iOS Simulator’

Xcode is one stop shop development app for OSX & iOS devices including all Macintosh Desktops & Laptop, iPhone, iPad & iPod touch.

 
Note: I Assume you are on OSX Yosemite 10.10.3 or Latest Operating System & Xcode 6 or later installed.

 
With release of Xcode 6 & later while developing & running your iOS app in iOS Simulator on your Mac you face with this bug something like this ‘Unable to boot iOS Simulator’ with blank screen.

 
Unable to boot iOS Simulator in Xcode

 
Here is how to fix it

 

Solution 01:

(more…)

Continue Reading Post

How to fix error ‘Safari can’t open page – because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy.’

Safari can’t open page - because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy

 
This happens to most of WordPress blogs when you sign in to your website’s Admin (wp-admin) page & whenever you try to navigate to different page or open a new page this error get displayed every time you do it.

 
Error: Safari can’t open page – because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.

 
Here is how to fix this,

(more…)

Continue Reading Post

How to manage startup items on Macintosh OSX, Add / delete startup items for optimising OSX for faster boot time.

Startup items are the Apps that automatically start or launch when OSX finishes booting up,

 
Startup items on OSX are called ‘Login Items’.

 
This feature is helpful when you want to launch app automatically without you doing anything at OSX boot time. Apps like Safari or iTunes would be helpful when you want to listen to music or browse the website without manually launching the app after OSX finishes booting up.

 
Here is how to manage Startup items or Login items:

 
Step 01: Launch ‘System Preferences’

(more…)

Continue Reading Post

How to make current Time Capsule, Airport Extreme or Airport Express Wi-Fi network hidden for all new wi-fi enabled devices including Macintosh, iPhone, iPad & iPod touch

airport-express-extream-time-capsule-wi-fi-hidden-network-osx-ios

 
As Wi-Fi speed is increasing & popularity is on high it is important to secure your network from evil eyes. And one step forward is to hide your network from scanning brains & eyes of Wi-Fi enabled devices including computers, tablets & phones.

 

Background about hidden or closed network:
When you create a hidden network with an AirPort Base Station or Time Capsule, the name of the network remains hidden from computers scanning for wireless networks. Users must enter the exact network name to join the network, and they may be asked to enter a password. Both the name of the network and the password are case-sensitive. A hidden network can provide additional security for your network.

(more…)

Continue Reading Post

How to Stop SPAM by blocking SPAM sender’s IP Address, An ultimate solution to block SPAM forever by using order allow deny ip in .htaccess

Before Moving Forward Read Important Note Below:

 
.htaccess deny rules are meant to block web requests (HTTP, HTTPS) to the directory in which the .htaccess is placed. Spam messages are sent via SMTP, and this protocol is not affected by the .htaccess file on your website. The .htaccess file will only work to prevent these IP’s from visiting your website, but will not have any effect on their ability to send you e-mail via SMTP.

 
If they are using a form on your website to send the spam messages, this might still be a valid solution. Otherwise, it is extremely unlikely that this will resolve your problem. If you are unsure of how the spam messages are being sent, you can refer to the message headers of the spam you are receiving. Now note down IP address from where SPAM is being sent to your E Mail ID & then block those IP under SMTP block list inside your Mail Server settings.

 
Gone were the days when you have to read & reply only 2 to 3 emails a day. In today’s technology age if you are from IT (Information Technology) related company you may be receiving 50 emails a day & replying & writing same & 50 additional emails to peoples & colleagues.

 
But it gets worst when Spammer starts to send you 50 SPAM mails everyday & if you have email ID attached to your personal domain other than that’s of Yahoo! & Gmail then you are irritated & disgusted to hell as you are receiving 50 to 100 SPAM email without indication hoe to stop & unsubscribe from that.

 
In my case I was receiving 50 mails per day for 1 month & beyond i.e. for 45 days & I was already blocked 700 email IDs in email block list.

 
I even contacted my hosting service provider but no prevail they just run away from problem by saying blocking the address is only the solution & only advice & help they can provide.

 
So I investigated on my own & finally I found the solution,

 
& Here it was:

 

Note: I assume you are on Macintosh system using OSX or any other operating system with local email management client like ‘Apple Mail’.

(more…)

Continue Reading Post

How to enable HTTP persistent connection or HTTP keep-alive for your website for faster page speed using .htaccess file

As Wikipedia explains:

 

HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. The newer SPDY protocol uses the same idea and takes it further to allow multiple concurrent requests/responses to be multiplexed over a single connection.

 

Note: I assume you have adequate knowledge of handling your server & server settings & you are well versed in your field

 
You can put following code in your .htaceess file which is available in your root of your server’s html folder

(more…)

Continue Reading Post