0

Inside of Whitebox testing

by Deepak Dhakal 15. March 2012 18:27

A very good Article.. Read it when you get a chance

http://agile.csc.ncsu.edu/SEMaterials/WhiteBox.pdf

Tags:

test

0

Apple will reject apps that don't fill iAd's blanks

by Deepak Dhakal 7. March 2012 10:16

Learned a lession this week with my app submission. I started suporting iAd on my app but forgot to include few extra validation when iAd is not available.

Here is the part of the doc from apple

"If you have dedicated a section of your app for an iAd, it's important to incorporate a banner view delegate that will handle common events, including errors," Apple says in the entry.

"Having the proper delegate to handle errors maintains the visual experience customers have with ads in your app by preventing a blank banner from being displayed when ads are not available."

Such strict measures will ensure  consumers aren't faced with an ad network that appears faulty. Keen to make sure iAd retains its initial high regard, Apple believes some visual stimuli is better than nothing at all.

 

Cost: My one week of waiting time and missed iAd revenue :(

Tags:

0

Add iAD on your app

by Deepak Dhakal 29. February 2012 11:39

Here is a step by step as I did it.

1. You need to enable iAd Network in your ituneconnect account :-
a) Make sure your iAd Contract is in effect.
b) Add a new app or if you are adding iAd to existing app, click on add version.
Then on that version, Enable the iAd for that app.
c) You may need to wait a while, then when you go to your iTunesconnect home page, you will see a new module "iAd Network" on the right column. Click that and follow the instructions.

2. Then just go to your XCode, add iAds thingies:-
a) Add Existing Framework - > iAd.framework.
b) In your .h add #import <iAd/iAd.h>
c) In your .h, add <ADBannerViewDelegate>
d) Create IBOutlet for the ADBannerView, drop the iAd object in your IB and
link it to the IBOutlet
e) Put all of the 4 delegates in your code. You need to show the ADBanner when an ad is called by the delegate. And when the delegate says there are no ads or error (due to no internet connection), you need to hide the AD.

This is my code:

Code:
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave {
	return YES;
	
}


- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
	AdIsShowing = YES;
	if (myAD.center.y>500) {
		[self moveAdIn]; // this is a custom method to show ad and move things around.
	}
}

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
	AdIsShowing = NO;
	if (myAD.center.y<460) {
	[self moveAdOut]; // this is a custom method to show ad and move things around.
	}
	
}


-(void)bannerViewActionDidFinish:(ADBannerView *)banner
{
}

Done. When you run, you should see the iAd Test Advertisment.

 

There is youtube video that explains in detail as well.

http://www.youtube.com/watch?v=cM9DqJmj45g

Tags: , ,

iPhone

0

Stock Web site

by Deepak Dhakal 19. February 2012 09:29

Tags:

Stock

0

Two namespaces and similar class name inside in C#

by Deepak Dhakal 7. February 2012 13:04
I have namaspace for two version of the same class, V1 and v2
namespace Hello.ThisIsAnExample.Noway.StillAnExample.V1
{
Class A
{
public void Nothing()
{
}
}
}

namespace Hello.ThisIsAnExample.Noway.StillAnExample.V2
{
Class A
{
public void Nothing()
{
}
}
}


Then in the Main class, use like this

using V1=Hello.ThisIsAnExample.Noway.StillAnExample.V1
using V2=Hello.ThisIsAnExample.Noway.StillAnExample.V2

Pubic Main()
{
 V1.A.Nothing(); // Calls V1
 V2.A.Nothing(); // Calls V2
}



Sweet !!! is not it ???

Tags:

.Net

0

Prevent iphone going to sleep mode

by Deepak Dhakal 30. January 2012 07:17

use one line of code

[UIApplication sharedApplication].idleTimerDisabled=YES'

Note: This will leave the screen's background light on, (after the user pressed the sleep button,) which will drain the battery.

Tags:

Powered by BlogEngine.NET 1.5.0.7
Original Design by Laptop Geek, Adapted by onesoft