0

Increase CTR for iAD

by Deepak Dhakal 22. May 2012 10:24

FOR THE IOS PLATFORM:

Not pausing an ad request when your view disappears

When your view goes off screen, you should pause the ad refresh timer, otherwise your ad will run in the background.  You do this by calling pauseAdAutoRefresh (see below). If you don’t pause ads when your view goes off screen, you will not only lower your earnings, you will impact your apps’ overall performance.

- (void)viewWillDisappear:(BOOL)animated {

! [super viewWillDisappear:animated];

! [self.adView pauseAdAutoRefresh];

}
Read more at http://blog.mobclix.com/2011/02/24/how-to-increase-your-click-through-rate/#UiI6yqLyE9OEZBMx.99

Tags:

iPhone

0

How to read text value from UIWebview

by Deepak Dhakal 3. April 2012 10:41

Use [UIWebView stringByEvaluatingJavascriptFromString:] method and get the values by executing the javascript.

Example: If your html is:

<html>
 
<body>
     
<input id="myId" type="text" value="TextValue"/>
 
</body>
</html>

Following code can get you the value of the text field:

   NSString* value = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('myId').value"];

Tags:

iPhone

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

Is there any tool that converts Objective C code to java for Android

by Deepak Dhakal 9. February 2011 13:42

I have a working iPhone app and want to convert to Android app with minimal effort. Can anyone suggest ?

ANS:

I don't think so. You're best bet would have been to develop the application from scratch using a platform like Appcelerator or Phone Gap.

The commenter makes an excellent point: the platforms are fundamentally different. A straight conversion of code won't work. You also have to convert framework/api calls and restructure all of your UI. Not only is the framework different, but the assumptions made by the platform are totally different as well.

Possibly the best way to reuse the most code (this isn't necessarily the easiest, keep in mind) would be to convert as much objective c code into C or C++ and make use of the Android NDK. You won't be able to reuse any of the UI code, but you might be able to reuse a significant amount of your application logic depending on what your application does.

Tags:

.Net | iPhone

0

My Second iPhone Applicaion is on the way

by Deepak Dhakal 6. October 2009 07:41

I have been working on an iphone application project about time tracking for the attronies.. It is almost done and is on the way .I took me quite a while to develop it as we had many issues about its workflow and layout. but finally we figured all out !!

 

See the animated gif image below and tell me what you think .. I will keep updating the progress.

 

 

Tags:

iPhone

0

iPhone Screen shot Creator ( For iPhone Developer)

by Deepak Dhakal 25. July 2009 06:25

Src: http://www.curioustimes.de/iphonesimulatorcropper/index.html



Info

I hacked this small tool to take screenshots of my app running in the iPhone-Simulator. Before that, i took a screenshot and cropped the application screen with the help of Pixelmator. Especially when you need screenshots in different languages this takes a lot of time (version by version of your app).

Another point to mention, you should upload screenhots in iTunes Connect as a JPEG in the resolution 320x460 pixels. This is without the status line on top.

Usage

It is very easy to use. Just start your iPhone app in the Simulator. Be sure that the Simulator window is not covered by any other window. Start this app and press the „Capture“-button.

Zoom image
Hint: If it cannot find the iPhone-Simulator, then use the Fuzzy detection slider and move it step by step to the right until it founds the simulator!


For example this a screenshot (from a very old version) of my app running in the iPhone-Simulator:

Zoom image

After pressing the „Capture“-button you will get this result, which is ready to be uploaded in iTunes Connect:
Zoom image

Tags:

iPhone

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