C++ in iOS

As we know there are many libraries out there that are written in C++. Now it would be really nice & handy if we could integrate them into our iOS App. There are many blogs out there that discuss the same.

I found this particular article quite good: http://philjordan.eu/article/strategies-for-using-c++-in-objective-c-projects

The article talks about the PIMPL approach. There is another link to the same related article by the same author:http://philjordan.eu/article/mixing-objective-c-c++-and-objective-c++

The following is one approach towards integrating C++ API into your App. To make things simpler there is a lot of wrapping to do.

Declare your class in the C++ header file as is.

Now to use this class in Objective-C we need a wrapper. To create this wrapper go ahead & make a simple Objective-C class which inherits from NSObject. But once you are done making, rename the extension of the implementation file from .m to .mm, this makes it an Objective-C++ file.

In this file we will be forward declaring a struct which will eventually wrap our C++ class. Create a pointer variable of the struct to be a member of the Objective-C++ class.

Implement the struct in the .mm file to have an object to our c++ class & some member functions to access it. Remember a struct is a valid “C” type. We have created an Opaque struct, but in the implementation it is ok to have member functions (which is allowed in C++). So this struct acts as a bridge between C & C++.

Once you have done this you are set.

The flow for the entire code will be in the form

IOS App Code -> Your Objective-C++ Wrapper -> Your struct wrapper -> Your C++ class in the header file

Continue reading

Attention to Details

One of the most defining things to come out of the Mobility Development revolution is the renewed focus on the User Experience. 

User experience is not a new concept. It has been there around since the beginning. The introduction of GUI (Graphical User Interfaces), & the mouse was one of the first steps taken towards making the users experience better. Its the first thing that people notice. At the launch of a new product people are curious to know how a particular product will look like.

Its the one thing that people say about Apple’s products. “They just look good”. Different companies have tried in their own way to make the User Experience a wonderful experience. But just what makes it click. 

As users we are able to tell when a product looks great & when it doesn’t or lacks in some aspect. This fact is highlighted even more in Mobile Devices. Attention to Detail.

This is most visible in Gaming. Introducing the effects of gravity to give a realistic feel, making sure objects move in the manner & direction in which people expect upon collision, or just moving the screen elements in accordance to the phone. Many of these changes are subtle. We as users would not even realize these things. But we will know for sure if they are absent. It takes some degree of effort to get the attention to detail in place.

A point to note. Im many cases, adding these small features may not improve or enhance the performance/utility at all. But they add a huge advantage in that it gives the user a feeling that he/she is using a great product. Putting in that little extra effort does have an additional value.

BOTTOM LINE: Put in the extra effort to add those nice features to your app. Either something that makes the app look & feel more realistic &/or something that increases the visual appeal of the app.

Multi Platform Apps

There are many Mobile Devices available today. They are powered by Apple’s iOS, Google’s Android, Microsoft’s Windows 7.5 and many others.

In most cases App development is largely restricted to making apps on a single platform. But it is equally true that there are a lot of apps available across multiple platforms. This is true especially which firms that develop apps for their clients. Clients would ideally like to have their apps available across all kinds of devices. This helps them increase their reach with their consumers. This poses a lot of challenges to the developers.

HTML5 is a very common approach adopted  by developers to solve the platform independence problem. A lot of people tell me that this helps solve the problem easily. Just make a mobile webpage using HTML5, embed a web component into your app & show the page on whichever device you wish. While this approach does save on development & maintenance time, it doesn’t really take advantage of the native features that each OS has to offer. Also if you are going down this approach it would be better off to just ask users to visit the website on a mobile browser itself.

Spending time making an app that uses native features of the OS is not at all a bad thing. It gives a great advantage of allowing you to improve the users experience & improving the performance of your app itself. Even if you have to make separate apps for each OS it gives a lot to the user, which should be the main goal of most companies wanting to sell apps.

For those users who are individuals making apps as a hobby or a source of income focusing on one OS initially helps a lot. As time goes on & you get more comfortable with the design & development lifecycle, you can start making apps for other OSes too.

Bottom line: Think about what your needs for now & the future are. If maintenance is really going to be a huge issue, then HTML5 might be OK. However, the best thing would be to make apps which take advantage of the native features of the OS.

 

Ideas & Execution

There are essentially a number of things that go into making a successful iOS App, or any other app for that matter. Good programming skills, ideas, enthusiasm to learn & create, execution are some. But the end result often depends on execution.

You may have the best idea in the world. But if you execute it badly. No one, I repeat, no one, will download your App. People need more than just a good idea. They want to see a quality product. In fact, the appearance & the finish give to the app, the overall user experience is what most people see first.

The first step is always the idea. What is it that you want to do? Once you come up with a good idea, you have to follow it up with execution. This could potentially involve a study on the intended audience, possible features to include may be even a survey of the apps that currently offer what you plan to offer. This entire process could take a lot of time. The next step in execution is very likely storyboarding. You give your idea some more shape by creating mockup screens. Its after all this is done that we move onto the familiar stage of coding & testing. Execution however, doesn’t end here. Getting feedback from friends & family is a crucial part of this entire process.

As we see, execution is critical, because if you rush through any one of the steps above, then your app’s a mess. There are many more things that people don’t think about. Like the art work, audio effects. All these things maybe small, but when combined together can have a huge influence on execution. There are many apps for a calculator. However, some of them are not as good as the others. This is the main thing.

Bottomline: Don’t ignore execution in the rush to get a new idea out fast!