Should You Learn Objective-C?

At WWDC 2014 Apple unveiled their new programming language, Swift. Swift language is a massive leap forward from its predecessor, Objective-C. Swift is a modern language which inherits many concepts from other popular languages including Go, Java, C#, Ruby etc. From the very start Apple made it clear that Swift is the path moving forward. At WWDC 2015 almost all of the sessions were delivered in the Swift language. 

At this point a common question on everyone's mind is that should I even learn Objective-C. Before answering this question with a simple YES or NO let me tell you my experience in development.

I have been developing professionally for more than a decade. During those years I worked at around dozen different companies ranging from oil and gas to health care. In those 10 years I can only recall couple of occasions where I worked on a *greenfield project. In all the other instances I was either fixing bugs or adding new features to the existing code base. Just last week I fixed some bugs on an iOS 4.0 application. 

The point I am trying to make is that although it might not be impossible to work on a brand new greenfield project, it is quite rare. This means most of the time you will be digging deep into the old codebase to either fix a bug or add a new feature. In iOS development this means you will be dealing with a lot of Objective-C code and which will be around for several future years.

So, to answer your question that whether you should learn Objective-C?

YES YOU SHOULD!     

*greenfield project means a brand new project where no lines of code has been written.

Evaluating Ionic Framework!

For the last couple of days I have been evaluating the Ionic Framework. Here are my thoughts: 

1) Clean Look: 

Ionic Framework looks very clean and slick. The developers behind Ionic has certainly spent the time in making sure that the Ionic look matches the iOS flat layout and also material display for Android. 

2) Documentation is Limited: 

The documentation on Ionic website is quite limited and most of the examples do not have any screenshots. Documentation is the life and blood of these small JS frameworks. The time investment in the framework becomes useless if no one knows how to use it. 

3) Community is Small: 

Ionic community is not that large so if you are stuck with a problem then you will find hard to get some help. Since, it is a quite new framework it is understandable that the community is relatively small. 

4) Steep Learning Curve: 

Ionic has a steep learning curve which becomes steeper with poor documentation. An example would be the tag <ion-nav-view> which is an integral part of the framework but it is only mentioned very briefly through the documentation. 

5) Performance is decent

The performance of the pages created in Ionic is pretty decent but they are no way near the native implementations. You can clearly notice the lag in some of the controls like modal etc. But on the other hand it is far better than any other mobile website framework. 

6) Failing Silently:

This reminds of the Sencha framework which also failed silently. Sometimes your code will not work and you will never know what happened. I believe Ionic near better routes validation and better core framework to warn users of the potential problems in their code instead of silently failing.   

7) Angular Support

Since, Ionic utilizes the AngularJS framework it has to keep up with all the changes. I believe the current version of AngularJS used in Ionic is 1.3.13 while the current version of Angular is 2.X. 

In the world of mobile website frameworks Ionic is among the best and definitely worth checking out if you are building mobile web applications. For me I will continue my search! 

 

Evaluating Xamarin

For the past couple of days I have been evaluating the Xamarin framework. Here are my thoughts:    

Storyboard Editor: 

Xamarin Studio Storyboard editor is quite slow as compared to Xcode. First, I thought that this might be on the first launch only but the slowness persisted after subsequent launches. Another problem I noticed immediately is when you are zoomed out to and click on any of the Storyboard scene then it selects "view" by default instead of selecting the "view controller". This really bugged me since when I am in zoomed out view I want to assign a custom class to the view controller instead of tinkering with the view. 

The Storyboard designer feels in a very fragile state. There are a lot of occasions where I was not able to delete the existing scenes on the designer. I also noticed that there is no way to select the segue from the designer. You have to expand the "Document Outline" to select the segue.  The Xamarin Studio also crashed multiple times after my Mac woke up from sleep. 

Auto generated Code Overriding Custom Code:

In Xcode when I add a custom UITableViewController class I don't immediately assign that class to my view controller in Storyboard. I usually write some code in my custom class and then finally when I am satisfied with the code I assign the custom UITableViewController class to the scene in Storyboard. I tried to do the same thing in Xamarin and unfortunately, that kicked in auto generated code which wiped all the custom code I wrote in my custom UITableViewController class. The workaround is to use the UITableViewController template for your custom table view controllers. 

One to One Method Name Matching .. Not Exactly: 

In the native implementation of the UITableViewDataSource protocol there is a method named "cellForRowAtIndexPath". If you try to find this method in Xamarin implementation it will yield no results. This is because in Xamarin it is called "GetCell". Now, I do agree that GetCell is a much better name but when you are reflecting another API in your framework you should not randomly name methods as you please. UITableViewDataSource's GetCell was easy to spot since I am quite familiar with it but what will happen when I am in an unknown territory then I will be sent on a wild goose chase to hunt down the equivalent method name in Xamarin.    

Consuming Third Party API:

In the native world if I have to consume some open source API then I simply copy and paste the source code in my own project and be done with it. Of course if I am feeling adventurous I can also use CocoaPods to manage my dependencies. In Xamarin  consuming existing Objective-C and Swift API's is not as simple. Check out the following link which explains all the steps you need to take to consume open source native API's implementing in Objective-C or Swift. 

http://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/

Code Sharing:

One of the good features of Xamarin is that you can write your service layer entirely in C# and then consume it from iOS or Android application. Code sharing in Xamarin really depends on per app basis. If your service layer is composed of complicated objects then your code sharing percentage will be high. In my case the services are implemented in C# and returning JSON objects. So, yes the consuming party which is iOS and Android application should have their own custom code to iterate and populate their own custom objects. Once, again depending on your domain model it can be complicated or simple.

Community:

Xamarin has a large community but when compared to the native iOS community it is still very small. Community is also an important factor when choosing a product because if you are stuck on some issue or need help then you are more likely to get help from a larger, move active community rather than the small community. 

Bottom Line:

Xamarin is a good choice if your background is in C# and you don't want to either learn or train your team in the native Objective-C or Swift. There is also a code sharing aspect which really depends on the size of your app. For me Xamarin still has a long way to go before I use it in my application. I also like to test out the brand new frameworks which Apple puts out in Beta builds which are usually not available on Xamarin on day one.

Houston Hackathon Recap 2015

The city of Houston hosted its largest Hackathon on May 16 - 17 2015. The idea of the hackathon is to build something exciting, practical and useful in just 24 hours. People from many different skill sets attending the hackathon ranging from developers, artists, public service, Houston Police Department. 

I was fortunate enough to attend the hackathon and represent "Blinds.com".

Before starting the hackathon everyone was given an opportunity to pitch their project. I already had project in mind but was also interested in finding out if I can help anyone else. Houston Police Department project caught my attention which required a mobile app for different inquiries. 

I connected with the officer who introduced me to the project and then I started on the implementation of the iPhone app.

The project was completed on before time and you can view it on ChallengePost. 

http://challengepost.com/software/slgt-mobile-app-zjq1i

I also worked on another project which involved iBeacons. I pitched this project for the Houston Museum district and how they can improve the interactions inside the museum using iBeacons.  

You can also check out the video of this project using the link below: http://challengepost.com/software/houston-museum-ibeacon-enabled-tour-iphone-application

After the final submission each team was given 3 minutes to present the project. After judges reviewed all the submissions and the presentations they announced the 3 best and the most practical projects. 

I am very proud to announce that our Houston Police Department App was one of the 3 winners. 


All in all it was great fun and very well organized. A big thanks go out to Jeff Reichman and his fellow organizers for making this event possible.

See ya next year! 

How I Gained 5X more Downloads for my App Using Twitter Ads

In the past I have used many different mediums of advertising for my app "Vegetable Tree - Gardening Guide". This included Skippy's Vegetable Garden, Garden Betty and Veggie Gardening Tips. I had mixed result with all the above options but I was never satisfied with the result. 

After reading an inspiring and informative post from Ryan Nystrom "How I validated a Niche Idea for $32.19 with Facebook Ads" I decided to give Facebook Ads a try. After setting up the ad for my Vegetable Tree app on Facebook with their less than impressive system I waited to see the results. I did got a small hike and increase in sales and downloads but it was not too much to get excited.

During that time I called Facebook for help and they called me back in couple of days. The lady on the phone immediately told me that the Facebook ads are not good for me. She kept insisting that I should turn off Facebook ads and simply not use it. As you can expect it was very discouraging for me. I asked her why is she recommending that I should not use Facebook ads and she said because my daily budget is too low. I was spending $5 daily to test out the ads. She recommended to increase the budget to $50. Of course I said no since I was just testing out the ads and didn't wanted to spend a large amount. Anyway, after that the conversation did not go anywhere since she only wanted to help me if I increase by budget. 

After the expiration of my ads I decided to renew it again and try it out for one more week. Unfortunately, it was too much to ask for the broken Facebook ads system. There was absolutely no obvious way to duplicate the ad and change the dates. I scheduled a call with Facebook and they called me back in 2-3 business days. I explained them the problem that I just want to change the date of the new ad. It took them at least 10 minutes to find out how to change the dates and it was so complicated that I still don't know how. 

After being disappointed with Facebook customer service and their ad network creation tool I moved to Twitter Ads. Twitter ads was easy to setup, although they also did not have any functionality to duplicate and change the ad. I got around to that by constantly running the ads with limited budget. Once, the budget expires the ads were automatically shut off. 

Twitter ads are injected directly into the user's timeline which makes them more appealing!

The Twitter ad creation tool is simple enough to fit my brain and I came up with the following promoted tweets. I believe at present you can enable two promoted tweets within a list of your composed tweets.  

For my overall downloads and revenue I was using iTunes Connect and App Annie. After running Twitter ads for one week I immediately started seeing the impressive results. The downloads for my app increased by 5 folds. I also made it to #15 in the world in the Lifestyle category. I can also see the drop in sales when Twitter ads were  exhausted, which means I ran out of allocated funds. The graph below shows the ups and downs. 

The dips are mainly because the Twitter ads were off during that time due to insufficient funds. Overall I am extremely satisfied with the result and will be using Twitter ads for my future products.

 

Smart Watch in Real Life

Couple of years back I visited New York with my brother. Our plan was to see as much New York as possible in one day. We walked for almost 5-6 hours straight and visited tons of awesome places. It was a lot of fun, except that I missed almost 10-15 calls including notifications. Even though my phone was on full volume and vibration I was not able to detect anything in the crowded city. This was a concern to me since anyone of those calls could have been an emergency call. All of those missed notifications could easily had been avoided if only I was wearing my Smart Watch. The vibration on your wrist is more identifiable than a ping in the pants. 

I planned the whole New York trip which included all the places I wanted to visit and the routes that I will take. The only problem was that when going to a new attraction I had to consult/listen to my phone for directions. One way to avoid this was to wear headphones and listening to directions but that felt like a dorky idea. The Taptic engine in the Apple Watch is capable of providing Haptic feedback which can be extremely useful in the above scenario. Think about it! You are making all the correct turns without even consulting your phone. People will think you are a freaking genius!

Of course if you don't make any wrong turns you will never end up in a new location

Now, lets talk about Grocery shopping! Unlike many people I like to write down the items I need from the grocery store. I mean I write down on paper, you know paper that is made from trees. At this point you might be wondering why the hell would I not use my phone instead. There are few reasons. First, I hate when I have the grocery list on the phone opened and the phone keep locking itself. Of course I can go to settings extend the time of the lock screen but then after I have done grocery shopping I will have to remember to turn it back to the default settings. Another issue is that sometimes I have to lift items that require both hands. This means I have to first put the phone in my pocket, pick the item and put it in the shopping cart and then again take out the phone out of my pocket to shop for the next item in the list. The Smart Watch will eliminate this constant juggling and our hands will be completely free to pick up those heavy boxes of baby diapers. 

The only point of doing groceries is to prepare for the party. I don't usually go to that many parties mainly because I am not invited but if you are the host of the party a Smart Watch would be a God send. Consider hooking your phone on the dock which is connected to your surround sound system. Now, with smart watch you can launch your music app on your phone and play Norah Jones in your party.

Throwing a party requires fitness. That is why every morning I wake up and perform a 7 Minute Workout. There are tons of iPhone apps that can be used to perform the 7 Minute Workout but using an iPhone for workout is such a painful and broken experience. You constantly have to consult your phone when to change the workout and your focus is lost. I use my Pebble Watch for my morning workout which provides a seamless experience. The watch vibration to change the workout keeps me focuses with my workout progress.

These are of course just few real life uses of smart watch technology. I am really excited about the smart watch future and with Apple Watch just around the corner things will just get more interesting. 

CloudKit Dashboard Bug

I have been playing around with CloudKit API in iOS 8 and found a really weird and annoying little bug. If you select your target and then create a new custom container and then launch the CloudKit Dashboard by clicking the "CloudKit Dashboard" button, then instead of launching your new container it launches one of your random containers. 

This bug of course exists if you have multiple containers and most probably you will since there is no way to delete your custom containers. So before banging your head against the glass table make sure you have the correct container selected in the web user interface of the CloudKit Dashboard.  

Blinds.com

I am happy to announce that I have joined Blinds.com as a Senior Mobile Developer. For those who are not aware Blinds.com is the world largest online blinds retailer and are owned by Home Depot. 

It is an exciting new opportunity and a new chapter in my life! 

Another Non-Indie Developer App Store Story

During last week I saw a number of Indie developers posting their sales numbers and indicating that achieving success on the App Store is getting tougher each day. I thought this would be a great time to share my personal experiences, which will hopefully help other indie developers in the community.

First, let me make one thing clear that I am *NOT* an indie developer. I worked on all of my apps during my spare time as a hobby and because of the passion I have for iOS development. Although I published my first app on the app store in 2010 I will only cover the year 2013 since it is more relevant.

In October 2012 I started working on my first non-game app (I have 9 apps on the app store) called "Vegetable Tree - Gardening Guide". The app aimed at gardeners and helped them keep track of their vegetable garden. It had over 50 (now it has over 70) vegetables with the sowing, growing and harvesting instructions. Vegetable Tree also allowed the gardeners to add vegetables to their garden and track their harvesting time. The app also allowed the gardeners to take picture/text notes and share them on Twitter and Facebook.

Vegetable Tree was released in November 2012 in the App Store. I quickly realized that it was not such a good idea to release a gardening app in the month of November. The sales during the course of November and December 2012 were depressing but I knew that it was because my app is a seasonal app. It was like releasing a valentine app in the month of August! No one would buy it since they don't need it.     

I continue working on the user interface few hours a week and making it more compatible with a gardening app (Green Color as the Primary Color). In March 2013 I saw a spike in the downloads/sales. I logged into the App Annie account and was delighted to find out that Vegetable Tree was featured in the App Store "Life Style" category.

Pricing

During the course of 2013 I experimented with the pricing of the Vegetable Tree app. Vegetable Tree was initially introduced with the price of $1.99. I bumped up the price to $2.99 and saw no decrease in the downloads. I bumped it again to $3.99 and witnessed no difference in downloads. Finally, I bumped the price to $4.99! At this price point I started to see decrease in the downloads/sales. I reverted the price to $3.99 which is the current price of the app.

The formula I used for pricing Vegetable Tree was very simple. The narrower the niche the higher the price. Also 95% of my customers are females who are willing to pay high price for quality products.

I never got an email or a review from a customer saying that the price was too high. Actually on the contrary I received emails from customers requesting new features and paying for them.  

Marketing:

I started with free marketing by distributing the app promo codes. Later during the Spring and Summer months I contacted different gardening blogs and advertised on their website.

http://www.gardenbetty.com/

Skippy Vegetable Garden  

I was also lucky enough to be featured on the BGGarden website.  Bren is such a sweet!!

Overall in marketing I spend around $120 on different blogs and websites. I spent more money in 2014 on marketing but did not see the expect results.  

Expenses:     

Apart from marketing expense I spend small amount on images and icons. I already knew the value of a great icon so I hired a professional and got an amazing Vegetable Tree app icon. 

The cost of the above icon was $200. Apart from the icon I spend around $60-$70 on the vegetable and pests images.

Features: 

I concentrated on the important features instead of amount of features. The Plant Now feature in Vegetable Tree is a unique feature which instructs the user what they can plant in their area right at the moment. Apart from the features the Vegetable Tree looked much more polished than all of its competitors. 

Revenue:

I believe this is the part you are most interested in. Here are the details for year 2013. 

Vegetable Tree - Gardening Guide: 

Downloads: 1480

Revenue: $3500.42

This includes all the downloads at many different price points including free downloads using promo codes. 

The total revenue of all of my apps (9 apps) on the app store was $3629.94. As you can see that Vegetable Tree was the huge chunk of the total revenue. 

Some might see this as a disappointing figure but keep in mind I did this app as a hobby on the side, during early mornings, late nights and weekends. One of the biggest mistake I made is not to offer in app purchase. I should have given a portion of the vegetable catalog for free and charge through in app purchase for the rest. I guess we all will learn from our mistakes.  

Bottom Line: 

In the end I had a great time developing Vegetable Tree app. My fortune was in the form of emails that I received from my customers. Vegetable Tree has consistently received high ratings (4.5/5.0) on the App Store and is considered the best vegetable gardening app. 

Download Vegetable Tree from the App Store

 

The Swift Divide

Unless you have been living under a pile of VB6 code, you probably should already know that Apple released a new language called Swift. Swift is a product of inspiration of several programming languages and clearly reflects Apple's future direction.

Developer's have already jumped on the early versions of Swift's bandwagon to create their next generation applications. It would be interesting to see how many people jump from Objective-C to Swift and how fast. 

In my recent tweet I posted about my fears of the possible hate relationship between Swift and Objective-C developers. Much like the VB.NET and C# community with the hate flowing towards VB.NET developers.

Unfortunately, this question cannot be answered at this time and only time will tell that how the followers of these two languages will be united under one supreme power, the love for software development. 

iBeacons

iBeacons are indoor proximity systems powered by low powered Bluetooth. Apple introduced iBeacons with the iOS 7 framework, so essentially any device running iOS 7 can serve as an iBeacon. iBeacons can provide improved user interaction in many different industries including retail, fashion, entertainment, home automation etc.  

Retail:

Consider a scenario where you prepare a shopping list of items at your home and as soon as you walk into the store your shopping list turns into a map indicating where to find the items. Even better it will automatically downloads coupons associated with the items in your shopping list.            

Museums: 

At present if you walk into a museum and wants to find anything about a particular exhibit then you have to put on those 80's headphones. With iBeacons technology you can simply walk up to the exhibit and your smart phone will reflect all the information about the exhibit. This provides a more seamless and pleasant experience for the users.

Unforgettable Items:

People always forget their valuables at their home or in their car. With iBeacons you can get notified whenever you walk away from your valuable. A great example would be your beloved Pet. You can make your pet wear an iBeacon and then whenever is left behind you will get a notification.  

OK! I am sold where do I get one? 

Before spending money on the iBeacon device which ranges from ($30 - $100) you can test out iBeacon using your Mac. Yes! your Mac can serve as an iBeacon device. For a Mac to act as an iBeacon make sure your Mac supports Bluetooth 4.0 technology. If you are unsure about your Mac compatibility with Bluetooth 4.0 then download the Mactracker app and see your Mac specifications.  

Once, you are 100% sure that your Mac can serve as an iBeacon you can use the MactsAsBeacon open source project to host your Mac as an iBeacon device. I have explained all these steps in my screencast Introduction to iBeacon

After you have tested the beacons you might be itching to get the real stuff. There are lots of companies that provide iBeacons but two of the popular ones are Estimote and Particle by KS Technologies. Apple is also working secretly on their own iBeacon device which might be an integral part of the home automation.  

I am really excited about iBeacons technology and I believe this industry is going to provide huge benefits to consumers as well as organizations.  

You are NOT Pardoned from Learning Objective-C!

Apple introduced a brand new language, Swift at the WWDC 2014 conference. Swift is a modern programming language which get its inspiration from Go, Ruby, Java and C# language. There is a lot of talk about completely ignoring Objective-C language and starting with Swift language. Although I can understand the excitement I disagree with the idea of completely dismissing Objective-C language at this time. 

Objective-C Open Source Base: 

Objective-C language has been utilized in lot of open source projects which are utilized in many iOS applications. Since, Swift is compatible with Objective-C you can always mix and match Objective-C code with Swift code. But if you want to extend and customize the open source implementation you must have Objective-C knowledge. 

Glaciers Move Slow: 

I live in Houston, TX where we still use horses and cows for our primary means of transportation. The last iOS project I updated was running iOS 4.0, and it was last year. This is just to show that large enterprise companies move extremely slow. Unless you are working on a green field application you are looking at at least 2-3 years before Swift makes a dent in the Houston market. 

Language is Easy, API is Hard: 

If you are familiar with one language you can quickly jump on to another language. Although Objective-C language has a learning curve but the real issue is learning the massive API accompanying the iOS framework. If you are an Objective-C developer then at most you will need a weekend to get familiar with the Swift programming language. 

In the end if you are in a high tech area like San Francisco, New York, Seattle etc then you will certainly benefit from utilizing Swift language in your latest project. If you are located at tech arctic circle then you will be maintaining a lot of Objective-C code before you will finally make a jump into the Swift language.

Turning Childhood Memories into Games

People have always asked me how I came up with an idea of an app! Almost always the answer is "My Childhood Memories". I played a lot of different kind of games when I was growing up in Pakistan and those games which were played physically are a true inspiration for making the next iOS games. If you are from South Asia you might be familiar with few of these street games: 

  1. Pitho Garam
  2. Kho Kho 
  3. Barf Pani 
  4. King King

The game I am working on right now is inspired from Pitho Garam. Pitho Garam is played by a team of two. Each team can have 5-6 members. The purpose of the game is to hit the tennis ball and collapse the rock tower and then make the tower again before any member of your team is hit with the tennis ball by other team member. The image below shows the game in action. 

Transient

Although the game I am building has slightly different concepts but it has been inspired from Pitho Garam game. I find it quite interesting that how easily these memories of our childhood can be carved into the modern iOS games. So, the next time you are looking for an idea try to take a journey back into your childhood and the games you played in the street.

I hope no one has patented the gameplay of Pitho Garam :) 

I am making a Documentary!

I always dreamed of ordering pizza from Pizza Hut while in Italy or eat delicious Taco Bell while in Mexico! Well my dream has come true because I will be visiting Cozumel, Mexico in the near future to make a documentary about effects of salt in sea water. 

My experience will be limited due to the confined walls of the hotel room where I will spend most of my time playing Atari games. The good news is that our team already have sponsors for this documentary and have raised over 10,000 YEN. That is freaking LOT OF MONEY!!!

Due to our big budget I have already preordered a nice looking and affordable paper shredder which I will be taking to Cozumel, Mexico. Following a wise advice that only bring absolute necessary things! 

The documentary will be over 15 hours long (take that Lords of the Rings) and will be available only on VHS tape. If you don't want to watch the complete 15 hours director's cut (for some lame reason) then you can watch the 4 hour trailer. 

PS: I just overheard some Hollywood directors talking about creating a documentary on worst documentaries and I think they mentioned our name! That is so freaking awesome! 

This is all for now! Stay tuned! 

Hex App

When I am designing my iOS applications I always get my inspirations from other beautiful applications. Apart from the slick animations and transition effects I am intrigued by the color combinations and shades used by these beautiful apps.

My process of extracting the hexadecimal color codes from these apps is as follows: 

  1.  Take a screenshot of the app screen using iPhone 
  2.  Email the screenshot to myself 
  3.  Open the screenshot in any photo editing app (Pixalmator
  4.  Use the dropper tool to find the hexadecimal color of the portions of the screenshot 

As, you can see this becomes a long, tiring process. It would be great if I can do everything using my iPhone? This necessity led the way towards the creation of "Hex App".

Hex App is an iPhone app which loads the app screenshots and allows the user to find the hexadecimal color code by just tapping on the color on the screen. This instantly eliminates all the unnecessary steps and increases productivity.