Saturday, December 31, 2011

Resolutions for 2012

For the first time in history, I am publishing resolution list online, let see if this helps.


  1. Shed at least 5kg weight
  2. The iPhone4s which can't resist myself from buying should be the last gadget for the year.
  3. Donate the pile of books I'm keeping to the library
  4. Publish at least 2 iOS apps
  5. At least 2 mac apps
  6. Publish at least 5 prototype from my idea vault.
  7. Gift at least one device
  8. Author 5 library/codes on Github
  9. Gift/sell my other devices - Too many Apple devices 
  10. Learn a new language/Framework (Ruby, Coffeescript, Node?)
  11. Build at least 2 Html5 app/util
  12. A vacation? I didn't leave home for almost 4 yrs.

Other than this there are quite a lot like perfect pitch training, learn a music instrument, painting etc., I carry from previous years.

I will sincerely try to complete these list before 21st Dec

Saturday, December 17, 2011

iCloud Gotchas

Integrating iCloud with core data was easy when I found this tutorial, but I ran into few issues while implementing and testing it on devices. And here are the steps how I managed to solve it.


Issue 1:


The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.


(0xE8008016).

If you create a new application Id and enable iCloud then you miss the adventure. It seems enabling iCloud on existing account provide different identifiers for key value store from app identifier.

And editing .entitlements file with Xcode adds some extra identifiers i.e., {APP_IDENFITIER}

Text is an awesome format, don't ruin the beauty with IDE/ plist editors.

Solution to this problem is, copy for key entitlements from your mobile provisioning file and paste the same in place of in your entitlements file.

appname.mobileprovision


appname.entitlements


Issue 2:

2011-11-21 22:57:35.770 appname[6338:1c03] *** -[NSFileManager URLForUbiquityContainerIdentifier:]: An error occurred while getting ubiquity container URL: Error Domain=LibrarianErrorDomain Code=11 "The operation couldn’t be completed. (LibrarianErrorDomain error 11 - The requested container identifier is not permitted by the client's com.apple.developer.ubiquity-container-identifiers entitlement.)" UserInfo=0x1b14b0 {NSDescription=The requested container identifier is not permitted by the client's com.apple.developer.ubiquity-container-identifiers entitlement.}

If you see this issue then your missed to update [nsfilemanager fileManager URLForUbiquityContainerIdentifier:@"with your valid identifier"] in your appdelegate

NSURL *cloudURL = [fileManager URLForUbiquityContainerIdentifier:@"3JCZ6A8BSY.com.yoursite.appname"];

Other common issues are

  • Forgot to turn on wifi when your device is in airplane mode (It beats me every-time)
  • Forgot to switch to your developer certificate from distribution to developer signing (code signing)

Friday, December 9, 2011

Airtel Broadband - How to find bandwidth usage

If you would like to keep tabs on your bandwidth usage?

http://122.160.230.125:8080/gbod/gb_on_demand.do




It is good to know your usage, the 10Gb fair usage plan from Airtel is peanut for my usage as I download a lot of TED & iOS Dev videos from iTunes.

I'm also sick of Airtel as they hijack all my trafic after FUP, even all https are redirected to http (sic). 

Monday, November 28, 2011

Installing more simulators for xcode 4.2 without re-downloading everytime

If you are like me, who use more than one machine to develop iOS app and wants to install 4.x and 3.x simulator without re-downloading it on every machine? then I've got a solution.

This is how I setup my installation - a 2 step process.

1. Find the .dmg files which is downloaded by XCode 4.2 and download it seperately.
2. Spoof your hosts file of the machine to point the files you have downloaded already.

Direct download link for 4.3
Direct download link for 3.x

Step 1:

By inspecting the console.app I was able to figure out the URL of .dmg xcode trying to download.

Eg. The path for 4x simulator is

http://adcdownload.apple.com/Developer_Tools/ios_simulator/ iphone_4.3_iphonesimulatorsdk4_3.dmg


which resolves into

https://developer.apple.com/downloads/download.action? path=Developer_Tools/ios_simulator/iphone_4.3_iphonesimulatorsdk4_3.dmg


Now, Open the xcode and select more simulators from the menu.

click install on any of the available option to keep the session validated against your developer acccount.

Once it started to download the file after authentication, just stop it.






Step 2:

Place your downloaded .dmg in
 <yourhomedir>/Developer_Tools/ios_simulator/iphone_4.3_iphonesimulatorsdk4_3.dmg

Start apache on port 80 and update /private/etc/hosts to have

#xcode4.2 legacy simulators dmg proxy
127.0.0.1 adcdownload.apple.com

Switch to xcode and click install again to install the simulator from your local machine without re-downloading.

Note:
Installing .dmg individually doesn't seem to install properly atleast in my case (While installing xcode, I've used different directory instead of typical /Developer)

Saturday, November 19, 2011

BTServer CPU Usage

I recently uninstalled all previous versions of xcode (I had all xcode from ios 3.2.x) to install 4.2 on my MBP. Although I freed around 30 GB, noticed an issue shortly. A process named BTServer is utilizing high CPU usage.



As quick search found that BTserver is a bluetooth service, I don't switch ON bluetooth service and the process seems to steal complete CPU cycles whenever the system is waking up from sleep.

Initially I was not able to correlate this with xcode as neither xcode nor simulator was running.
Closer studies on process hints as it is part of xcode framework. And here is the solution to fix this issue.

Find com.apple.BTServer.plist in your xcode installation path typically /Platforms/iPhoneSimulator.platform/Developer/SDKs /iPhoneSimulator5.0.sdk/System/Library/LaunchDaemons/ and change the value for key Disabled to TRUE from FALSE



It seems to solve the problem for me now. But I have not tested with Apple bluetooth keyboard and mouse.

Sunday, November 6, 2011

mclock - Additional clock application for mac menu bar


Update (2016-01-20): The app is now available on Mac App store.

-----

Additional menu clock for your Mac. A minimalist clock to display time of different timezone of your choice.

The app stays in menu bar all the time and you can customize the display format and timezone.





I was recently working on a calendar based iPad app project. The events are fetched from users salesforce.com data, since users data are in different timezone and requirement is that I should only display events between 8am-8pm.

I set my macmini and device timezone to user timezone to test and develop.  I also liked to have another clock for my localtime. As I don't use writst watch and broken home button on my iPhone is driving me crazy to check my local time.

I did search for free utilities and I didn't find one as I like to use. I hate to bring dashboard everytime and free apps available as floating windows sucks.


Source: https://github.com/palaniraja/mclock

Download: Get it from Mac App Store  |  mclock.app

Thursday, October 6, 2011

RIP - Steven P. Jobs


The people who are crazy enough to think they can change the world, are the ones who do.

Thursday, September 1, 2011

iTunes 10 Logo


End credits from the movie Up 


iTunes logo updated with version 10 in Sep '10

Thursday, August 18, 2011

Idea to action: Tile this



Not many of my ideas are converted to a project, this one has seen its light last week. Though I haven't completed all the UI and features of my original vision, it is better to have one working idea than nothing.



Please find the source of this extension @ https://github.com/palaniraja/Tilethis

My original prototype for Tilethis










Download v0.1 to try it yourself.


@todo

  • Display image dimension (Google extension sample "Get image info" is useful to study how to fetch dimension from image)
  • Make it work with images in the background (eg., div background)
  • Nice UI


Merge requests are welcome.


Wallpaper - Testflight app

I really liked the background image pattern used in testflightapp.com. It is so cool that I have replaced my all time favorite iPad-Safari-fabric texture to gray varient given below.

Testflightapp.com original image



My taste of Gray 



My desktop, thanks to Camouflage


Good job guys @ testflightapp.com

Thursday, July 28, 2011

RIL2Insta - Import Read it Later links to Instapaper

One of my long time wish to write a Chrome extension completed last week. It all started when my answer was down-voted at apple.stackexchange.com, the original answer was based on my experience sometime ago I was searching to migrate my links between my Instapaper accounts.


How does it work?

It parses your exported *.html file for links and submit each items to Instapaper to add to your account.
  1. Login to your readitlaterlist.com in a new tab.
  2. Goto http://readitlaterlist.com/export/ to export all your links.
  3. Download and install latest version of RIL2Insta from Github
  4. Paste content of your exported file in the grey-textbox.
  5. Provide your Instapaper credentials and click Post it for me.

Code is available at Github - https://github.com/palaniraja/RIL2Insta

Screenshots









Wednesday, June 29, 2011

Distribute your iPhone/iPad adhoc builds Over The Air using Dropbox

Update: I recently found this site called diawi.com which allows you to distribute the app similar to file-sharing sites, drag and drop ipa file and share the link to the testers.



Yes, there is an awesome service by Testflight App which I highly recommend. Not because I received their stickers for being an early adaptor :). It does so many things which makes distributing app for beta testing a breeze, go try it yourself.

I was just curious to know how OTA works, after testing with own web server for internal testing, I thought why can't I do this with Dropbox?


  • Build your app from xcode using Build and Archive option.
  • Upload your ipa file to Dropbox. And get public link for the ipa.
  • Download the manifest.plist file from https://gist.github.com/1051160 and edit the line #14 with the public link of your ipa. Modify other keys as well (bundle-identifier, bundle-version, title)
  • Upload the modified manifest.plist to Dropbox and get its public link.
  • Download index.html from https://gist.github.com/1051163 and edit url param at line #8 with public link of your manifest.plist
  • Upload the index.html to Dropbox and share the public link of it with your beta testers.

Upload your ipa
Copying public link

All files, copying public url for index.html 


Installing the app




App icon will be disappeared once the installation complete (which is weird), but restarting the device does solve the issue. You have your app on springboard for testing. Enjoy delivering your adhoc builds to your testers by distributing over the air.

NO iTunes FTW.

Wednesday, June 15, 2011

Shell script to generate images for testing


Recently I was in need of generating sample images for no. of products in my db. I really hate to create a copy of image for each products in my db.

I modified my previous shell script to automate the process of creating random images for given no. of product ids with relatively smaller no. of sample images.


scriptsDir$sh randomImages.sh
Completed generating 74 images from 5 sample images.

Find the Gist at https://gist.github.com/1026973


How to view (Windows) line ending characters on Mac OSX

Notepad++ on windows has this beautiful option "View all characters" to display all invisbile characters such as line endings.




Programming editors on mac like Textwrangler and Textmate has an option to Show Invisibles but failed to display the character block for Carriage Return as Notepad used to.

Textwrangler beats Textmate on this case where it display two special characters to refer CR and LF, where Textmate display only one character.

Textwrangler

Textmate


Our recent iPad project write csv file which is further parsed by a third party app. The 3rd party app requires the line ending to be a combination of Carriage Return (CR) and Line Feed(LF) instead of just Line Feed (LF) as traditional Unix/Mac. To test the csv generated is good, I had to view the character myself in any other editor.

After few failed attempts with both Textwrangler and Textmate, I came across this powerful unix tool called OctalDump (od) which is part of OSX.

od -c filename.csv

will display the file with C-Style escaped characters. CR as \r and LF as \n. It has numerous no. of options to explore.




Wednesday, June 1, 2011

Recommended Git workflow

I recently started using Git as my revision control tool. Impressed by the use of branching and merging, I create and merge a lot of branches. Our company use SVN and other peers were not aware/interested in Git. So I took the initiative to use svn-git. After months of progress I left with so many branches for features, svn, QA-release and quick-fix for released builds.

I did a quick search and find a good Git workflow by Vincent Driessen. I found it very useful, and I recommend the same. Not necessary that it should be used with Git only; if you are brave enough you could follow the same with SVN too.

A successful Git branching model - by Vincent




  1. Why Git is better than SVN
  2. Git - SVN Crash course
  3. Git - cheat sheets

Tuesday, May 31, 2011

Desktop Notification with Html5

I've recently stumbled upon studio.html5rocks.com and found the cool trick to display desktop notifications like Gmail.


I thought it is cool, thinking of including it in any of my app I plan to do.

Here is the core part of the snippet.




But you have to ask for user permission before displaying the notification. Find the complete tutorial at html5rocks.com

Monday, May 16, 2011

Shane Warne - The Leader

Color me surprised, I was amazed by his replies. Here is my favourite one

Harsha Bhogle: What you strive to do as a leader? Understand people?

Shane Warne: Look, it is a real difficult one sometimes, as captain, because you want to be their friend. I think it is important to be their friend and let them know. Because once you get their friendship and trust then you can talk direct and be honest with them. If you haven't really built up that trust, you can become a dictator. And there is a big difference between being a dictator and friend. It is a lot easier to accept criticism from you friend or a decision you may not like from a friend.

But you still need to keep that distance as a captain and let them know that you are in charge.


Read the complete interview @ https://www.readability.com/articles/knquxpl6






Saturday, May 14, 2011

Play Angrybirds on web (Chrome)



HD for good configuration comps | SD for little out of date comps

For those who wants to see all levels without completing a level or struck in a level, here is the hack, copy the following code, paste it on url textbox and hit enter.


javascript: var i = 0; while (i<=69) { localStorage.setItem('level_star_'+i,'3'); i++; } window.location.reload();




Hack from wesbos.com

Enjoy!!!

Enter into / Exit from Recovery mode for iPhone

Yes, every post you come across suggest the same thing, hold your power button and home button for X seconds. Though it is true, unfortunately I had a couple of situations my iphone doesn't respond to the key combinations. And some time it is very frustrating to hold your buttons so long.




Though TinyUmbrella's basic functionality is to save and restore SHSH blobs, it has the feature I was hoping for.

No holding of Sleep/Wake and Home button required. One click to put your connected device to DFU Recovery mode and another to exit from DFU Recovery mode.

Sunday, April 24, 2011

Radio buttons and Checkboxes

I have designed the following as one of my side project required a simple radio buttons and checkboxes.


Download the *.png files.

Feel free to use the same however you like.

Update 2012/04/11: Hover image for checkbox without checkmark

Friday, April 22, 2011

Capture screenshot of the app with iPad simulator


Until recently I was not aware of the shortcut Ctrl + Cmd + C 

It captures the complete content of the iPad simulator to the clipboard, You can save it to a file by File -> New from Clipboard with preview.app

Secret is hold your Ctrl key on Edit menu (Note: Simulator is at 50% window- > zoom)
Screenshot captured - 768x1024 on Portrait
I would love to know if there is an app for screen-casting iPad applications regardless of monitor resolution. Something that capture content of the window in Portrait or Landscape mode similar to the solution above.

Sunday, April 3, 2011

We are the Champions


After all the hiccups over years, we were able to witness the ultimate glory of bring back the cup to India after 28 years. India is a nation with at-least 50 million cricket experts including me. Though I'm not a professional player or an expert I do have rights to talk (who cares anyway)

I was waiting to see Sachin's 100th century knock and though he failed to score, he won the cup. Hard work always pays, he won the hearts of teammates and everyone played for him. I don't think it would happen to any other player again. Even a player like Sachin caliber had to wait for 6 world cups to get hold of the cup teaches some important lesson we should learn.

  • Hardwork
  • Humble
  • Honesty
  • Patience
  • Loyalty
  • Passion
  • Patriotism

Here are my favorite moments :)








Well done guys, now go, find and groom bowlers for the sake of cricket.

Blog Archive