Thursday, February 19, 2015

Malayalam Keyboard for iPhone and iPad

 

With Varamozhi, you can type in Manglish and you will see text in real Malayalam.

Varamozhi is now a custom Keyboard. Follow instructions in Setup & Usage to enable Keyboard.

https://itunes.apple.com/in/app/varamozhi/id514987251?mt=8

Sunday, December 28, 2014

Convert svg file to png file on Mac

To Convert an vector (.svg) file into a png file , we can use command line

Open Terminal application.

switch to the directory (use cd comand) where the svg file contain

qlmanage -t -s 1024 -o . myvectorfile.svg

This will create a png file named myvectorfile.svg.png with 1024*1024 dimension in the same folder.

* tested on Mac OS X 10.10.1

Monday, September 23, 2013

The app X was not installed on the iPad because the app could not be found.

We may get this error message when install application on iPad

here is a helpful link

http://www.imore.com/daily-tip-fix-app-apps-itunes

Or try to delete from the library and re-download them from the app store, then try again.

Thursday, May 9, 2013

Type malayalam on Mac machine

We can use the Keymagic application for OS X. Go to http://faisal.in/type-malayalam/ to download and install.

We can get the malayalam font RachanaMac from here

നന്ദി. :)

Another helpful link for malayalam typing/reading  is www.33dots.com/index.php/web/to-read-and-type-malayalam.html

Wednesday, April 17, 2013

Xcode 4.6.2 - PCH file built from a different branch

After updating Xcode 4.6.2, got error like

error: PCH file built from a different branch ((clang-425.0.27)) than the compiler ((clang-425.0.28)) xcode 4.6.2

After do a Clean (Product -> Clean) its disappeared :)

Monday, December 17, 2012

iOS - Search or compare korean text

In our UItableView search, we are using the below code to search a typed text in the cell content

 NSComparisonResult result = [eachCellContent compare:searchText options:NSDiacriticInsensitiveSearch|NSCaseInsensitiveSearch range:NSMakeRange(0, [searchText length])];

This is working fine. But this is not working with korean text.

E.g:
suppose one of the cell text is "소".//we are getting this combination by typing these two letters   ㅅ and ㅗ
If we type ㅅ only , our compare method is not working and so not listing the "소". (it is working if we type both ㅅ and ㅗ )

But the above example is working well with AddressBook application.

Is there any other compare method to support this ? (we also need this NSDiacriticInsensitiveSearch|NSCaseInsensitiveSearch )

Updated on 2013-01-14

Got solution from stackoverflow

NSString *normalizedContent = [eachCellContent decomposedStringWithCanonicalMapping];
NSString *normalizedSearch = [searchText decomposedStringWithCanonicalMapping];
and then compare these.


NSString *eachCellContent = @"소";
NSString *searchText = @"ㅅ";

NSString *normalizedContent = [eachCellContent decomposedStringWithCanonicalMapping];
NSString *normalizedSearch = [searchText decomposedStringWithCanonicalMapping];

NSComparisonResult result = [normalizedContent compare:normalizedSearch
                                               options:NSDiacriticInsensitiveSearch|NSCaseInsensitiveSearch
                                                 range:NSMakeRange(0, [normalizedSearch length])
                                                locale:[NSLocale currentLocale]];
if (result == NSOrderedSame) {
    NSLog(@"same");
}
// Output: same
 



Thursday, November 8, 2012

application executable is missing a required architecture. At least one of the following architecture must be present armv6

Getting this error when submit a universal application.
"application executable is missing a required architecture. At least one of the following architecture must be present armv6"

The issue was with changes in Xcode 4.5.x for ios 6
Its minimum supported os version is 4.3
So we have to set the Deployment Target = 4.3 or greater. 

Friday, November 2, 2012

Xcode : iPad mini simulator

The 'iPad mini' has the resolution of iPad which is 1024 x 768.

 iPad mini does not have a Retina Display. It has greater pixel density. But the pixel density is not  good as Retina Display

So we can use the Device Simulator labeled as 'iPad' for testing 'iPad mini'

Wednesday, October 31, 2012

unsupported architecture armv7 - Xcode 4.5

Got this error when try to submit universal application

On Build Settings, The Architectures are:

$(ARCHS_STANDARD_32_BIT)
armv6

Its fixed when change the value of "Build Active Architecture Only"

Build Active Architecture Only = Yes

Wednesday, October 24, 2012

iOS - Getting thumbnail of PDF document

We can get the thumbnail of any page of pdf document. The following example is getting the thumbnail of first page

            NSURL* pdfFileUrl = [NSURL fileURLWithPath:filePath];
            CGPDFDocumentRef pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfFileUrl);
           
            CGPDFPageRef page = CGPDFDocumentGetPage(pdf, 1);//for the first  page
            CGRect aRect = CGPDFPageGetBoxRect(page, kCGPDFCropBox);           
            UIGraphicsBeginImageContext(aRect.size);
            CGContextRef context = UIGraphicsGetCurrentContext();
           
            CGContextSaveGState(context);
            CGContextTranslateCTM(context, 0.0, aRect.size.height);
            CGContextScaleCTM(context, 1.0, -1.0);
            CGContextTranslateCTM(context, -(aRect.origin.x), -(aRect.origin.y));
           
            CGContextSetGrayFillColor(context, 1.0, 1.0);
            CGContextFillRect(context, aRect);
           
            CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(page, kCGPDFCropBox, aRect, 0, false);
            CGContextConcatCTM(context, pdfTransform);
            CGContextDrawPDFPage(context, page);
           
            UIImage *thumbnail = UIGraphicsGetImageFromCurrentImageContext();           
            CGContextRestoreGState(context);
            UIGraphicsEndImageContext();
            CGPDFDocumentRelease(pdf);

iOS - get the thumbnail of a video

We can get the thumbnail of any time. The following example is at time 0

MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:filePath]];
moviePlayer.shouldAutoplay = NO;
UIImage *thumbnail = [moviePlayer thumbnailImageAtTime:0 timeOption:MPMovieTimeOptionNearestKeyFrame];
[moviePlayer stop];
[moviePlayer release];


Another way to get the frame - http://stackoverflow.com/a/4330647

Monday, October 22, 2012

-bash: svn: command not found - After Mountain Lion update

To install the command line tools
Xcode Menu, Go to preferences , In the Download tab, click to install Command line tools.