Wednesday, February 27, 2013

testflightapp android is about to get live soon

TestFlightApp Android is in private beta release. Mobile app developer’s will get a unified solution for managing beta-testing on both iOS and Android.

Android developers and testers can now enjoy the benefits of TestFlight including beta management, distribution, tracking, and centralized feedback. TestFlight streamlines the beta-testing process so developers can spend time building better apps vs building tools to manage their beta-testing.

Visit this page to sign up for the Android private beta.

Hurray!

Saturday, September 22, 2012

iPhone 5 graphics default / splash image size and name

Hey geeks!

A new big screen iPhone device (iPhone5) is now in the market, To support this 1/2" bigger screen apple recommends (Following is the Email I received):
"If you are updating your app for iPhone 5 and iPod touch (5th generation), you must provide additional screenshots to support the new screen dimensions for the App Store."

The new screenshot dimensions are:

640 x 1136 (portrait)
640 x 1096 (portrait)
1136 x 640 (landscape)
1136 x 600 (landscape)


To support default splash on retina and non-retina display older iPhone devices, we used to have default.png (320px X 480 px) and default@2x.png (640px X 960px), To support iPhone 5, now we need to add an image of size 640px x 1136px in your resources folder.

name:  Default-568h@2x
Size :  640px x 1136px

Hope this helps!

note: Make sure It meets apple guidelines as well. Its just a information and update to help you guys with my personal notes/knowledge I gain by learning.

Saturday, June 30, 2012

iPhone popover overlay view over navigation controller bar issues & fixes

I was trying to add a popover view to my iPhone app, To get this done there is a nice and popular solution
https://github.com/werner77/WEPopover/
(i.e.  popover implementation for iPhone with same API as the UIPopoverController for the iPad)
While adding it on navigation controller bar, I found 2 issues:

Issue #1:  It was not appearing on app launch but on app resume.
Solution : In WEPopOverController controller class

- (void)presentPopoverFromRect:(CGRect)rect  inView:(UIView *)theView   permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated {}

change  from [keyView addSubview:backgroundView];
to [theView addSubview:backgroundView];

Issue #2. It was hidden behind nav bar.
Solution : With Instance of WEPopoverController, presentPopoverFromRect:inView:permittedArrowDirections:animated:, Instead of presenting it in self.view I have presented it further up in the view hierarchy (I did in self.view.window)

Tuesday, May 22, 2012

iPhone | Problems with NSURLConnections to Run consecutively (in parallel)

I was trying to get multiple NSURLConnections (async) to run in sequence (consecutively).

The first call worked well (made request & fetched response) while on new async call from "connectionDidFinishLoading" (fyi, I was in a situation that based on first call response) the next call connection doesn't seem to work, as none of the NSURLConnection delegate methods are triggered.

Background threads don't automatically have an active run loop on them. You need to start up the run loop after you create the NSURLConnection in order to get any input from it. Fortunately, this is quite simple:
[[NSRunLoop currentRunLoop] run];
The default mode of NSURLConnection is asynchronous -- it creates and manages a new background thread for you, and calls back to the delegate on the original thread. You therefore don't need to worry about blocking the main thread.

Hope it will work for you, cheers!

Tuesday, May 15, 2012

iPhone | Change Section header in UITableView

Go for it!
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection: (NSInteger)section {

if ([self tableView:tableView titleForHeaderInSection:section] != nil) {
return 22;
}
// If no section header title & header needed
return 0;

}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
NSString *sectionTitle = [self tableView:tableView titleForHeaderInSection:section];

if (sectionTitle == nil) {
return nil;
}
// Create label with section title
UILabel *label = [[[UILabel alloc] init] autorelease];
label.frame = CGRectMake(0, 0, 320, 18);
label.backgroundColor = ANY_COLOR_OR_IMAGE_PATTERN;
label.textColor = [UIColor whiteColor];
label.shadowColor = [UIColor whiteColor];
label.shadowOffset = CGSizeMake(0.0, 1.0);
label.font = [UIFont boldSystemFontOfSize:14];
label.text = sectionTitle;

// Create header view and add label as a subview
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, SectionHeaderHeight)];
[view autorelease];
[view addSubview:label];

return view;
}

Test with iOS 5 as well.. please!
Let me know if any issue.. thanks!

gson error in android application while JSON parsing | type mismatch JSON error with gson

While developing an android app having loads of usage of JSON (actually REST server based), We decided to go ahead with GSON library(I think pretty awesome except following issue).

issue : It worked fine on all android phones (fyi.. tested on few Motorola,Samsung and HTC devices..) except the HTC Explorer(a good Value for money phone as a testing device even for personal usage).

btw, error was in JSON parsing (library).. and While I was trying to run,..YUCK! I was getting a "Force Close" with some type mismatch JSON based error!

Solution:
The "fix" of renaming the gson package with jarjar did the trick..
If anyone else has this problem, here's a quick solution; (fyi, we are using gson 1.6)
Steps - how-to fix it:

1) Download jarjar (http://code.google.com/p/jarjar/downloads/list)
2) Put jarjar-1.0.jar and gson-1.6.jar in the same folder
3) Create a new text file in this folder (rules.txt)
4) Write the following line in the textfile: rule com.google.gson.** com.google.myjson.@1
5) From the command line, open jarjar with the command "java -jar jarjar.jar process rules.txt gson-1.6.jar myjson-1.6.jar"
6) Replace the gson library in your project with myjson and update the imports

so what was the reason.. OOuch! many of the android devices (probably the HTC, as I observed) use GSON library for internal apps... this is what I know.. not sure :) ..

Droid guys! Stay tuned for more bugs..ah! solutions ;)