All posts by John

Reachability: Testing Internet Connectivity on IOS APP


Any apps that you build today will require some form of internet connectivity.

In today’s mobile applications environment, apps are getting more and more intuitive. Users are constantly looking at the apps to notify them of the lack of connectivity.

Step 1 : Getting Reachability library into your Xcode Project

We will be using the following library, Reachability.

There are 2 ways to setup the app in your Xcode project.

1. Manual
– Check out a copy from the above github url, add the Reachability.h/.m file to your project

2. Cocoapod
– Add the following line to your pod file, pod ‘Reachability’
– Run pod install on terminal.

Step 2: Setting up the SystemConfiguration Framework.
– Go to the Project -> Targets -> Build Phases tab.
– Add SystemConfiguration.Framework into your project.

Step 3: Codes to set up Reachability to test internet connectivity.


Import the Reachability.h, at the very top of the file.

#import “Reachability.h"


Add the codes below to your application did Finish Launching method.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

Add the following codes,

Reachability *reachability = [ReachabilityreachabilityWithHostname:@"http://localhost:3000/"];

reachability.reachableBlock = ^(Reachability *reachability) {
NSLog(@”Network is reachable.”);

reachability.unreachableBlock = ^(Reachability *reachability) {
NSLog(@”Network is unreachable.”);

// Start Monitoring
[reachability startNotifier];

Checking for inactivity in K2 Smartform

This article covers the steps to get a timer going that checks for inactivity.

Inactivity is consider as no movement in the mouse or keyboard.

So here we have create a View and add a Data Label in it.

Step 1, adding a Data Label
Step 1, adding a Data Label


Next go to the rules designer and add a View Initialize Rule.

2. Adding a View Init Rule
Step 2. Adding a View Initialize Rule

Now configure this rule and do a “Transfer Data” action.

3. Adding Transfer Data Action
Step 3. Adding a Transfer Data Action

The javascript that does all the magic is found here,

But for our case, we need to modify it a little, so to use my version download the script from the following link,

4. Adding the script
Step 4. Copy the script into the rule


Finally, Save & Checkin and Test.

Step 5. Testing!
Step 5. Testing!

Adding Or Removing mysql from AutoStarting on Mac

The following snippet provide sample for adding the mysql service to cheap jerseys auto start on mac.

Note: You should input all these in the terminal cmd cheap jerseys China window.

Step 1 :

Step 2:

The following snippet kolejnego allow you Montreal to remove antes auto starting the mysql server.

Things to note here my manually removing this file from the LaunchAgents will not unload it!