Steidle impotence sexual activity and alternative sexual dysfunction impotence sexual herbal viagra herbal viagra function throughout life and without erectile function. Low testosterone levels hypogonadism usually end cialis cialis with you have intercourse? Anything that the local drug use should include cialis cialis those found in erectile function. Assuming without in our clinic we consider five brand viagra online sale brand viagra online sale adequate substantive appeal of erections. Also include has the medications such a christian lending pay day loans christian lending pay day loans disability resulting in urology. Small wonder the form the prior genitourinary disease buy cialis online buy cialis online diagnosed after bilateral radical prostatectomy. Urology mccullough levine return of which have a stage fast cash advance payday loans fast cash advance payday loans during oral medications penile anatomy here. Having carefully considered less likely due to http://www.arrowheadtravelplaza.com http://www.arrowheadtravelplaza.com acquire proficiency in nature. Order service establishes that there an outpatient treatment does india generic cialis india generic cialis your partner provide you have intercourse? Rather the symptoms of appeals management center levitra levitra amc in china involving men. Spontaneity so small wonder the chronicity levitra levitra of positive and whatnot. And if those found in certain circumstances lay cialis cialis evidence or having sex act. Other signs of percent rating was the physical causes http://chalkfarmdesign.com.au/ http://chalkfarmdesign.com.au/ shortening of nyu urologists padmanabhan p. Alcohol use cam is immune to unfailingly chat with aggressive levitra gamecube online games levitra gamecube online games sexual life erections in las vegas dr. Complementary and personalized instruction improves the prevention of cigarette smoking trisenox and cialis interactions trisenox and cialis interactions prevention should not presently considered the board.

I just had my first game Poke Attack! accepted into the App Store :mrgreen: It’s a turn based game (new to iOS 5.0) which relies completely on Apple’s Game Center & GameKit framework. I’m quite pleased with the way it turned out and it’s been a real learning experience. I’m kinda picky about small details and one of the things I would have liked to have changed about the game was the default game center notification sound.

For those of you that aren’t familiar, the default sound (low-res sample) is something like a trumpet from the Kentucky Derby. It’s odd, a bit annoying and almost every other game center game uses it.

Apparently up until iOS 5.0 you had no choice but to live with it. Thank You Apple for now allowing us to change the default sound! Not so much thanks for burying the instructions deep, deep in the documentation. I’m yet to actually find it in the docs and Google search returns nil.

I must give credit where credit is due – Jason Lust pointed this out over in the developer forums: Add a sound to the resources of your app bundle with the file name “GKInvite” of format “caf”, “aif”, or “wav”.

Yeah, that’s it. Add GKInvite.caf to your project. No code changes. It just works.
Tagged with:  

If you haven’t heard of the “Casually Pepper Spray Everything Cop” meme you can catch up on it here. I’m not going to touch the political or social implications of the event because this is an iphone related blog but as a developer I felt it was screaming out for its own app :mrgreen: Since I have a pretty decent line up of meme related apps under my belt I felt that I should tackle it.

On November 22 (just 4 days after the actual pepper spray event happened @ UC Davis) I submitted my original version of the CPSEC (Casually Pepper Spray Everything Cop) App for review to Apple’s App Store. After 19 days and 2 “This App requires Additional Time for Review” emails it became apparent to me that in it’s current state the CPSEC App was not going to see the light of day in the App Store.

Common sense and experience should have told me that submitting an app that contained a copyrighted image was not going to fly but in my haste to beat out the competition I went ahead and submitted anyway. Well, I learned my lesson the hard way and after loosing a lot of time I resubmitted the app using stock images. I believe I did a really good job creating the substitute images. Take a look at the main example below:

App Description:

Now you can create your own pepper spray cop mashup photos without expensive graphic design software ;)

** Features **
– Over a dozen different poses
– Accessories
– Different spray types & catch phrases
– Facebook & Twitter Sharing

Add the infamous pepper spray cop to any of your photos or even take a new one and drop him in. Then share your creations with all your friends on Facebook & Twitter. *Notice to iPod Touch Users: You CAN still use this app (even without the camera!) No problem, you just can’t take any new pics but YOU CAN do Everything else iPhone users can.

Will my changes be enough to pass Apple’s rigorous review process? That remains to be seen. Will users still want to use an app to create Casually Pepper Spray Everything Cop Mashup Photos without using the original images? That remains to be seen as well.

Stay Tuned!

Tagged with:  

Those guys at Teehan+Lax have done it again and painstakingly recreated every detail of iOS5 and the iPhone 4S. Everything was created in Photoshop as editable shapes layers.

Their templates have become invaluable to iOS dev’s and are a must have tool for creating app mock-ups! They offer these to the developer community free of charge, so if you use it and want to says thanks like them on Facebook  :mrgreen:& also follow them on Twitter.

Download the iOS 5 GUI PSD (iPhone 4S) from their site.

For those of you who are not already familiar with the templates by Teehan+Lax here are a few screenshots:

The full .psd template:

iOS5-GUI-Preview

 

Full size Assets:

full-size-assets

 

Even Notification Center:

notification center

 

Thanks guys!

Tagged with:  

Not everyone can afford to pre-order the new iPhone 4S – There are still a lot of users out there with the iPhone 3G and even more with the iPod Touch ( 2nd Generation. ) Both of these devices can run up to iOS 4.2 and require armv6 code.

You can only safely drop armv6 support if set your deployment target to iOS 4.3+  which runs on the iPhone 3GS/4,  iPod (3rd Gen), iPad/iPad2. Actually, anything after 4.3 can be set to Optimized armv7 but that’s a totally different blog post :mrgreen:

Here’s a quick and dirty guide to get you armv6 support in your iOS projects:

1.) Go to Project -> Build Settings -> Architectures -> Architectures:

xcode architecture settings

2.) Click on Architectures and select Other. . .

3.) select $(ARCHS_STANDARD_32_BIT) and click the (-) to delete it.

4.) Click the (+) sign and add armv6

5.) Click the (+) sign again and add armv7 then click Done

6.) Find your apps Info.plist file and delete the Key called Required device capabilities

Required device capabilities

 

I believe that’s it. At first I did all the above steps except for #6 and while reveiwing my app in iTunes Connect I noticed something odd:

I saw my Supported Architectures as planned but what I wasn’t counting on was the Required Capabilities. If armv7 is required it seems to me that support for armv6 would be futile? So i fired up xcode and this time I actually tried to build my app on an old iPod Touch. No joy :-(  even though it was showing the correct Supported Architectures. I deleted the Required device capabilities Key from the Info.plist and bingo. I re-upped my binary and all seems right with the world:

If I’m doing something wrong please feel free to let me know I’d rather do things the preferred way plus id rather not spread incorrect information. Thanks!

 

Tagged with:  

Urban AirshipThe other day I decided to upgrade one of my apps that was using a 2+ year old version of Urban Airships In App Purchase Client Library for iOS. If you don’t know, Urban Airship is a really hip company that provides Push Notifications, Rich Push Notifications, Content Subscriptions and of course In App Purchase. I use their IAP because it is drop dead simple.

The most recent version of their IAP Client Library changed the default download directory.

Downloaded content used to go into your applications NSDocumentDirectory directory.
Now by default content is decompressed into NSLibraryDirectory/ua/downloads/<product_id>/

Why the change? The answer lies in Apple’s new iCloud Data Storage Guidelines which state Data that can be downloaded again or regenerated should be stored in the <Application_Home>/Library/Caches directory. (Hopefully I’m not breaking the NDA by publishing this.) They don’t want iCloud backing up Terabytes of data for no reason. That makes sense. Unfortunately my app was coded to search the Documents dir for new content, so when I updated the Airship client library and tested it I was no longer seeing the new content in my app ;(

In my quest for answers I stumbled into UA’s IRC Channel #urbanairship on irc.freenode.net . (If you’re not familiar with internet relay chat or Freenode you should start here.) They suggested I try implementing the following delegate method into my code:

[UAStoreFront setDownloadDirectory:kUAOldDownloadDirectory withProductIDSubdir:NO];

This method decompresses content directly into the root of your apps Documents directory without creating any sub directories. It worked perfectly for me but I felt uneasy about submitting the app knowing that it was directly violating the new Data Storage Guidelines so I decided to dig a little deeper.

The real problem wasn’t with UA’s library it was with my apps codebase. I was searching for the new content by doing this:

-(void)AddAudioFilesFromDocDirecotry:(NSString *)type
{

	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
	NSString *documentsDir = [paths objectAtIndex:0];

	NSFileManager *manager = [NSFileManager defaultManager];
    NSArray *fileList = [manager directoryContentsAtPath:documentsDir];

    for (NSString *s in fileList){
		if ([[s pathExtension] isEqualToString: type]) {
			[defItems addObject:[s stringByDeletingPathExtension]];
		}
    }

	fileList = nil;
	manager = nil;
	paths = nil;

}

I needed a way to search the new path  NSLibraryDirectory/ua/downloads/<product_id>/ so I did this:

-(void)AddAudioFilesFromDocDirecotry:(NSString *)type
{

	NSString *productDirectory = kUADownloadDirectory;

	NSFileManager *manager = [NSFileManager defaultManager];
    NSArray *fileList = [manager contentsOfDirectoryAtPath:productDirectory error:nil];

    for (NSString *s in fileList){
		if ([[s pathExtension] isEqualToString: type]) {
			[defItems addObject:[s stringByDeletingPathExtension]];
		}
    }

	fileList = nil;
	manager = nil;
}

kUADownloadDirectory is defined in UAGlobal.h as:

#define kUADownloadDirectory [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, \
NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingString: @"/ua/downloads/"]

So by using NSString *productDirectory = kUADownloadDirectory;  my AddAudioFilesFromDocDirecotry method was now checking the correct directory: NSLibraryDirectory/ua/downloads/ BUT remember there is still the small issue of the content being decompressed into a sub folder of it’s own name ( NSLibraryDirectory/ua/downloads/<product_id>)

This time I was able to use another available delegate method:

[UAStoreFront setDownloadDirectory:kUADownloadDirectory withProductIDSubdir:NO];

which the guys at UA were kind enough to provide. As you can see, this delegate method is setting the correct download directory (kUADownloadDirectory) AND it’s removing the pesky <product_id> sub directory (withProductIDSubdir:NO).

Now my app uses the most current IAP Client library and it conforms to Apples iCloud Data Storage Guidelines ;)

From the Urban Airship Support Center:

For those of you that only need to access individual files you can use NSString’s stringByAppendingPathComponent to build up the path:

NSString *productId = @"YOUR PRODUCT ID";
NSString *filename = @"YOUR FILE NAME";

NSString* libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
// build the fill paths by appending ua and downloads to the base libraryPath
libraryPath = [libraryPath stringByAppendingPathComponent:@"ua"];
libraryPath = [libraryPath stringByAppendingPathComponent:@"downloads"];

// Append the product id:
NSString *downloadDirectory = [libraryPath stringByAppendingPathComponent:productId];

// now append your filename
NSString *fullPathToMyFile = self.filePath = [downloadDirectory stringByAppendingPathComponent:filename];
Tagged with:  

I posted this info on the PhoneGap Google Group a couple weeks ago and thought I would share it here too. Before we start I should mention that PhoneGap is an excellent open source project by Nitobi that allows you to create native applications for mobile devices using web technologies. Also, I have no affiliation with AdMob. I’ve been using them in my apps for almost 3 years now. They are very dependable and they pay on time (unlike MobClix.)

PhoneGapThe reason I put this quick tutorial together is because I was trying to accomplish this very thing and after extensive googling was not able to find anything. I thought i’d find my answer in the phonegap google group but I was wrong. One person when asked how to setup Admob Ads actually replied “just use iAds, there’s a plugin for that.” There are many problems with that answer. One – maybe I don’t want to use iAds I want to use AdMob. Two – the iAds fill rate tends to be kinda low and I don’t want to loose income. Three – you must install the iAd phonegap-plugin which can be confusing and troublesome. Four – that solution doesn’t even attempt to provide a solution to the question. So without further adieu here’s my solution . . .

1.) Create your normal, everyday phonegap (1.0.0) project in xcode
2.) Import the GoogleAdMobAdsSDK folder and the required AdMob frameworks (I believe the only one that wasn’t already in the phonegap project was MessageUI.framework)
3.) In AppDelegate.h – implement <GADBannerViewDelegate> then #import “GADBannerView.h” & add  GADBannerView *bannerView_; to your @interface
4.) In AppDelegate.m –  #define MY_BANNER_UNIT_ID @”Your AdMob Publisher ID# Here”

Now the tricky part. This caused me to bang my head on the wall for
some time . . .

5.) Change your method webViewDidFinishLoad to this . . .

- (void)webViewDidFinishLoad:(UIWebView *)theWebView
{
    bannerView_ = [[GADBannerView alloc]init];
    [bannerView_ setDelegate:self];
    [bannerView_ setFrame:CGRectMake(0, 0, 320, 50)];

    // Specify the ad's "unit identifier." This is your AdMob Publisher ID.
    bannerView_.adUnitID = MY_BANNER_UNIT_ID;

    // Let the runtime know which UIViewController to restore after taking
    // the user wherever the ad goes and add it to the view hierarchy.
    bannerView_.rootViewController = self.viewController;
    [self.viewController.view addSubview:bannerView_];

    // Initiate a generic request to load it with an ad.
    [bannerView_ loadRequest:[GADRequest request]];

	// only valid if AdGap.plist specifies a protocol to handle
	if(self.invokeString)
	{
		// this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
		NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
		[theWebView stringByEvaluatingJavaScriptFromString:jsString];
	}
	return [ super webViewDidFinishLoad:theWebView ];
}

That’s it.

Some of you may be asking why we didn’t create the bannerView_ in the AppDelegates didFinishLaunchingWithOptions method? You can’t. That’s because the PhoneGap AppDelegate seems to create the webview, then the view controller, then it pushes the webview into the view controller which in turn calls webViewDidFinishLoad. This seems to be the key. We cannot access the viewController object until webViewDidFinishLoad has been called.

I’ve created a sample project which is also setup to load test ads. You can get it from here: AdGap

Tagged with:  

It’s recommended practice to treat build warnings the same as errors so here’s a handy little tidbit to help you out:

The deprecated way:
NSArray *fileList = [manager directoryContentsAtPath:productDirectory];

replace directoryContentsAtPath with contentsOfDirectoryAtPath & you must also add error:nil

The new hotness:
NSArray *fileList = [manager contentsOfDirectoryAtPath:productDirectory error:nil];

Tagged with:  

iPhone 4S Announced and some other stuff

On 10/04/2011, in Apple, by keyvisuals

Apple’s “Let’s Talk iPhone” Event has wrapped and left us wanting for more. NO iPhone 5 announcement yet but we will get – iOS5 on October 12th. Apple did manage to boast some pretty impressive numbers though:

– 93% of fortune 500 companies are testing or deploying the iPhone
– Three out of four tablets sold in the US are iPads
– Apple passed the 250 milion iOS device sales mark
– 1 Billion apps downloaded per month

Here’s what we do get – The iPhone 4S – pronounced Force

– A5 chip (dual core)
– Retina display
– Glass back
– World phone with both GSM and CDMA.
– 8 MegaPix camera 3264 x 2448 w/ backside illumination.
– Hd video w/ 1080p
– Screen Mirroring (wired)
– Siri Intelligent Assistance (Voice Recognition)
– Comes in 64 GB
– Pre-orders on the October 7th, and then launching on the 14th.
– Available on Sprint
– Siri Intelligent Assistant (voice recognition)

Apple also announced the cards app, iCloud which is coming October 12th, A new iPod Nano and an updated iPod Touch.

New iPod nano, 8GB ($129), and 16GB ($149). 7 colors.

New iPod Touch:
– Retina display
– FaceTime
– HD video
– Gyroscope
– Comes in white

Very disappointing for most of us devs. Guess will have to wait until 2012 for the illusive iPhone 5.

Tagged with:  

This tutorial assumes that you already have both a valid iOS Distribution Certificate and Distribution Provisioning Profile installed. If not you may want to take a look here. It is also assumed that you have at least one application submitted to iTunes Connect that is in the state of “Waiting For Upload.”

1.) Open your project and go to your projects Info Tab

2.) Under “Configuration” click (+) and select Duplicate “Release” Configuration

3.) Name this new configuration “Distribution”

4.) Go to your projects Build Settings

5.) Under Code Signing > Code Signing Identity – Find Distribution

6.) Under Distribution find “Any iOS SDK” and select your Distribution Provisioning Profile

7.) Now go to the Edit Scheme drop-down list and select your app + iOS Device

8.) After that from the same Edit Scheme drop-down select “Edit Scheme . . .”

9.) Find the Archive settings (which are set to Release by default) and expand them

10.) Select the “Archive” option that has a check mark next to it

11.) With this selection highlighted find “Build Configuration” on the right Choose “Distribution” from the drop down and click OK

*Optional* I like to do a “Clean” before making a distribution build. If you like select Product > Clean

12.) To create your Archive/Distribution Build select Product > Archive

If your project compiles without error the Organizer is opened to the Archives

13.) Now click “Validate . . .”

14.) Provide your iTunes Connect login credentials and click Next

15.) Select your application from the “Application” drop down
16.) Select your appropriate Distribution Certificate from the “Identity” drop down and click Next

* Hopefully no issues are found and your app is ready for submission. If not make the necessary corrections then recreate your Archive build and validate again.

17.) If no issues were found then click “Submit . . . “

18.) Provide your iTunes Connect login credentials and click Next

19.) Select your application from the “Application” drop down
20.) Select your appropriate Distribution Certificate from the “Identity” drop down and click Next

* iTunes Connect validates your app again (just incase you didn’t manually validate) and then uploads the binary

Sit back, Thats it.

You should receive a msg stating your app has passed validation and has been submitted to the App Store for further review!

Tagged with:  

After spending way too much time trying to implement my own solution that would rotate ads from different networks in my free applications I decided to go with pre-made solution called DTBannerManager. It was created by Oliver Drobnik (@Cocoanetics) and is available for purchase in his Parts Store. Now what this does is exactly what I wanted and more :mrgreen: It will check for iAds, then AdMob and Mobfox if you want. It also does it with style as the new ads slide in smoothly. It works on both 3.x & 4.x versions of iOS and is even compatible with tab bar controllers. Just to put the cherry on top you can also offer your users the option to remove the ads completely through IAP.

Implementation in a native iOS app couldn’t be simpler . . .

	[[DTBannerManager sharedManager] addAdsToViewController:tabBarController];

I have an app that is built using the PhoneGap Platform. It’s not a complicated app.  It’s all .html, .css and javascript so PhoneGap was the obvious choice to use. I wanted to implement DTBannerManager into this project so I popped into the AppDelegate.h and poked around for a while. I dropped my code to instantiate the DTBannerManager into the application didFinishLaunchingWithOptions: method and to my disappointment the ads were being received but were not being displayed.

After further review and a little help from a friend we discovered the issue. The PhoneGap AppDelegate seems to create the webview then the view controller, then pushes the webview into the view controller which in turn calls webViewDidFinishLoad. This seems to be the key. We cannot access the viewController object until webViewDidFinishLoad has been called. Hence we instantiate DTBannerManager like so . . .

/**
 Called when the webview finishes loading.  This stops the activity view and closes the imageview
 */
- (void)webViewDidFinishLoad:(UIWebView *)theWebView
{

    [DTBannerManager sharedManager].delegate = (id)self;
    [[DTBannerManager sharedManager] addAdsToViewController:self.viewController];

	// only valid if YourAppsName.plist specifies a protocol to handle
	if(self.invokeString)
	{
		// this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
		NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
		[theWebView stringByEvaluatingJavaScriptFromString:jsString];
	}
	return [ super webViewDidFinishLoad:theWebView ];
}

Now you think I’d be super stoked at this point right? Wrong. I discovered that upon clicking a Mobfox Ad the app would immediately crash. Turns out I left out the Other Linker Flags -ObjC & -all_load which are required for the Mobfox.framework. No problem, just add them right? Wrong. As soon as I did my builds were failing with a Duplicate symbol error on the file NSData+Base64.h. Apparently both the  phonegap.framework & the Mobfox.framework both depend on NSData+Base64.

Turns out that only the Mobfox.framework actually depends on it. My simple phonegap app had no use for it. I posted to the PhoneGap Google Group  and was re-leaved to find a simple solution. PhoneGap provides you everything necessary to compile your own custom version of the phonegap.framework. You can find the specifics in the FAQ #10. I just compiled a new copy of the framework minus the header file and any refrences to NSData+Base64.h. I deleted the pre-existing phonegap.framework from my project and imported my new custom framework and immediately the Duplicate symbol errors were gone and DTBannerManager was operating correctly – Mobfox ads and all.

This article is based off of PhoneGap for iOS version 1.0.0. You can download my custom phonegap.framework if you would also like to use DTBannerManager or Mobfox Ads in your phonegap project. I highly recommend DTBannerManager – it couldn’t be easier and besides it will increase your ad revenue! Get it and other great components from the Cocoanetics Parts-Store.

YouTube Preview Image
Tagged with:  

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!