Objective-C and Opening files in your iOS application from mail

Screen Shot 2013-12-21 at 8.46.11 AMI have been coding on my iMac for a bit now to learn objective-c (which I am seriously still a newb at, it’s like me writing a term paper in German). Well, anyway, I have started to gather some tips that took me a while to figure out so I figured I would share my findings. Since I am using xCode 5.x most of the search results are pre version 5 and don’t help a lot. Google and the iOS developer library have been invaluable along with all of the sample applications. So if you read anything I could do easier/better please let me know.

The first part of accepting files in your iOS application is registering the file types you are wanting to open within your application. This allows your application to show up in the open dialog when you hold down on an attachment in an application like mail:



This was a little bit of a challenge because the new UI in xCode 5 does a lot of this for you. You no longer have to edit XML, you can just use the properties dialog to register for the file type. Here is what I did to register my application to open ZIP files:

Screen Shot 2013-12-20 at 1.11.11 PM


You can get a full list of supported System-Declared Uniform Type Identifiers here. Once you figure out what files your application will use, the next step is to code the retrieval of that file in your application.

Like any newb, I learned a lot of things the hard way – I should have probably bought a book but I figured I would struggle through it because I learn better. What I found out is the iOS sets up its file system in a sandbox manner. Meaning applications have their own “space” in the storage device. It is setup very similar to user directories in Linux. Each application


When you gesture to open a file with your application it is actually copied to the Documents/Inbox directory under your . So one lesson I learned is to clean this puppy out after processing the file because, for instance, if you keep opening the file my-archive.zip it actually keeps getting copied to the Inbox folder and you could have a situation where you keep storing new copies:


After debugging a little I noticed that while testing my application I ended up taking up over 300MB of space with many copies of the file. This is basically a “memory leak” if the application does not delete these files appropriately.




Peeking interest with a picture, mastering Tumblr

In the past few months I have been automatically posting my blog articles to Tumblr. I started using Tumblr a few months ago pretty actively to read other blog posts solely based on their picture – I am very visual guy. This is why I have made it a point to post a picture in just about every blog article. I like the aesthetics of Tumblr, especially when bloggers use compelling and attractive pictures. I wonder if there is a Tumblr theme for WordPress, I will have to look into that.

Do you use Tumblr?

Screen Shot 2013-12-20 at 8.41.39 AM

This is a voice dictated blog post

dictationI am using my Mac voice recognition to type this blog post. While I think this technology is pretty cool, correcting mistakes still requires the mouse and keyboard. I am very surprised the technology works with my voice with no training. So far I have spoken this blog post with no mistakes. I am not sure if I would ever use this going forward for writing blog posts but I do think it is interesting. I am not using A plug-in microphone, I am using the built-in microphone in the iMac monitor. If this actually allowed you to do correction I think the technology would be much more valuable.

You can also do things like:-) or even a:-(.

Punctuation, Typography, capitalization, and currency symbols are well supported.

You can even do intellectual property signs like the ©,®,™.

I can even format a number. Four instance 2342.

In the end I think this is pretty cool.

<<end of dictation>>

To learn more about voice dictation on your Mac you can check out this article which gives you all of the commands supported.


Top 20 posts on this blog in 2013: SEO stands out!

glassesSimilar to all years, the Home Page was king on this site. However, I would like to point out a new contender among the posts – “Why do you favorite a tweet?“. This was posted earlier this year in April and has been a popular target for SEO. The title is basic, it asks a question, and many apparently ask the search engines the same question. The key for me in this space is to “get the word out”. Use social sites like LinkedIn, Twitter, Facebook, and Google+. However as you can see from my referer post it’s all about SEO. Make sure your content and title are relevant and searchable!

Once again, thanks for reading my blog and have a happy new year!

Continue reading

Top 20 Locations where my blog has been read in 2013

Wrapping up my year in blogging, the next stat is “where” my blog is read. It always amazes me that I can see what readers in other countries visit my blog. I am heavily read in the United States, and India has a large readership (over doubling the views in the UK).

A quick shout out to WordPress.com for providing these stats for free!

Once again, thanks for reading my blog!

Additional Edit: If all of my readers could comment where they are from I think that would be pretty cool.

Top 20 Countries in 2013

Screen Shot 2013-12-18 at 3.14.47 PM

Enhancing your brand experience with digital wallets

DigitalCouponSplash-smallWhy do companies still send out coupons through snail mail? In this day and age where most people don’t even carry cash, wouldn’t it be nice to not have to bring coupons with you shopping?  How about going up to the point of sale and swiping a membership card (or look you up) and having all of your coupons readily available to apply right there and then?

Continue reading

Rewarding customers with stackable promotions

stackable-promotionsSome stores do this but I have not seen a lot of online stores that do this today and I really don’t understand why they don’t. The closest thing I have experienced to “stacking promotions” is the use of a Macy’s credit card and applying some coupons they sent me in the mail on top of the order. At times I am shocked at the total discount and sure as heck it keeps me going back to Macy’s because of it! So why not online? Why don’t more eCommerce sites offer the ability to stack promotions. Well if your site is based on WebSphere Commerce then its as easy as pie to do. Check out the video below to see the administration and customer experience for stackable promotions. I also give a glimpse into my next video about digital wallets.