Posts

Plist find error (Xcode, iOS)

If you have edited a Plist file on your own, it sometimes might not work after adding back to the Xcode project. Finding the error can be cumbersome. However, Macs come with a great tool called plutil . You can directly run it from the command prompt. Just run plutil E.g: plutil /Desktop/MyApp/myplistfile.plist You can easily figure out where the issue is after running the command.

Most useful terminal commands

Below is a list of mostly helpful terminal commands you'd need to get on with your work. I'm planning to keep adding entries to this list later. Print environment variable echo $ E.g:  echo $PATH   would print the PATH variable value Mac Show current Xcode location xcode-select --print-path Print current path (working directory) pwd Perform Load testing (Using Apache AB) You can easily perform a simple load test using Apache AB. Macs come with apache AB installed. You can directly run from the terminal. ab -n  -c E.g:  ab -n 100 -c 5 http://www.google.com/

kSoap2 printing request dump

Hi, kSoap2 is a library for SOAP which is used in Androids. Here's a neat little trick, if you want to see the actual XML sent received. 1. Set httpTransport.debug=true; before making the call 2. Read values from the httpTransport object afterwards String s1 = httpTransport.requestDump; String s2 = httpTransport.responseDump; Have fun !!!

iOS Split Video into frames

Dear all, You may have encountered scenarios where you would like to split a video into several frames at different time intervals. This post is for you if you intend to do the splitting at device level. I presume that you have some reasonable experience with Objective C and XCode such as adding a framework and adding a file. There are several steps to do to get this going. 1. Build an XCode project and add a video file to project. I've worked with .mp4 files. Should work with other standard formats. 2. Add AssetsLibrary framework and AVFoundation frameworks to your project 3. Create a AVAsset object with your video. You need to pass the location of the video as a NSURL object. I added the video(myvid.mp4) as an asset to my project. Therefore, I will use the following method to create the asset object. AVAsset *asset=[AVAsset assetWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"myvid" ofType:@"mp4"]]]; NOTE: If you ne...

iOS 7 UISearchBar Issue

Dear all, Transition into iOS 7 introduces a lot of adjustments. One such adjustment is the UISearchBar. If you try to set the UISearchBar to the NavigationBar inside a UIViewController, then it will not work correctly in iOS 7. The workaround for that is to use a UISearchDisplayController. Here are the steps. 1. Create your UISearchBar UISearchBar *newSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]; newSearchBar.showsCancelButton=YES; newSearchBar.delegate=self; 2. Create a UISearchDisplayController and initialise with the UISearchBar & your ViewController UISearchDisplayController *searchDisplayController=[[UISearchDisplayController alloc] initWithSearchBar:newSearchBar contentsController:self]; 3. Set the datasource & delegates of the UISearchDisplayController searchDisplayController.delegate=self;//The delegate of UISearchDisplayController searchDisplayController.searchResultsDataSource=self;//The data source for the search res...

Crittercism "is this an employee-facing app" meaning

Hi all, Crittercism is very useful in many of our developments. If you have tried to make a new app with Crittercism, they ask you a question "Is this an employee facing app". Apparently, there seems to be no definition and I couldn't figure it out even with the help of my teammates. So, I asked Crittercism myself and here is their explanation. "The question is asked to find out whether your application will be published in the App Stores for anyone to download (B2C) or whether they will be used internally within your organization or company by employees only (B2E)." Hope this helps you too :)

Android Multi format TextView

Hey Androids !!! This is going to be my very first post on Android development. You may know that I've written many posts on Dot Net, Java & iPhone. From today onwards, I will add Android to that list :) So, if you're in a situation that you need to have a single label(TextView) with multiple formats, then this will be the post for you. It becomes very simple when you know a bit of html. Here is a list of tags supported by Android TextView before you get started. Have a look at this before you start. Suppose you have a TextView named multiFormatView TextView multiFormatView; The first step is to build your HTML string. String htmlString = "<b>This is bold</b>"+"And this is not."; Now there is only one line of code. Just set the text to the TextView using. multiFormatView .setText(Html.fromHtml(htmlString)); That's it. So, it will print  This is bold. And this is not. You can juggle around with each o...