easyAPNS is an open source (free) system for sending Apple’s push notifications to a device. From their website:

What is Easy APNs?
If you are a native iPhone application developer, you may have heard of the Apple Push Notification service (APNs). There are a lot of excellent online guides on how to get your application to receive remote notifications… but what about the other piece of the puzzle… ACTUALLY SENDING A MESSAGE?!?!

This very cool project is brought you by Manifest Interactive.

*NOTE: I was NOT able to get this up and running on GoDaddy Hosting for some unknown reason, but the same exact files worked flawlessly on (mt) MediaTemple

Tagged with:

Now that I’ve started working with the latest and greatest iPhone SDK I’m running into a bunch of deprecated method errors. It’s recommended practice to treat warnings the same as errors so I have been trying to fix them as they pop up. The one in particular that was giving me trouble today was:

NSString *contents = [NSString stringWithContentsOfFile:fullpath];

After doing a bit of Googling I found the solution.

Replace NSString *contents = [NSString stringWithContentsOfFile:fullpath]; with:

NSString *contents = [NSString stringWithContentsOfFile:fullpath encoding:NSUTF8StringEncoding error:nil];[NSString stringWithContentsOfFile:fullpath encoding:NSUTF8StringEncoding error:nil];


(Side Note: Ever since I began coding my vocabulary has expanded. Now I get to use words like Redacted and Deprecated ;-) Thanks Apple!)

Tagged with:

I wasn’t paying attention yesterday when I opened iTunes it told me there was a new version of  iPhone OS that fixed a major vulnerability. Without thinking I went ahead and updated my iPhone OS to 3.0.1 No big deal right? WRONG. All of a sudden XCode no longer recognizes my phone as a development device.

What this means is that I can no longer test code on my phone :oops:

After a quick search I found the solution posted on the iphonedevsdk forums! The original post can be found at http://www.iphonedevsdk.com/forum/iphone-sdk-tools-utilities/21005-xcode-3-1-3-3-0-7a341.html

For those of you who just want the fix and want it now, here it is . . .

(Just paste this line into a terminal window while XCode is closed)

ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ \(7A341\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1

That did it for me, hopefully it helps you!

** UPDATE 11/12/09 : BOTH my wifi & network connection detection apps are WORKING Again! **

If you write an app that depends on internet access in order to function properly Apple requires that you detect the state of the connection and report it to the user when that connection is unavailable. If you do not Apple will reject your app on the basis that it is confusing to the user. Confusing because the app does not work and Apple assumes that the user will not understand why. Makes sense.

Here is one way to determine whether or not the users device has airplane mode enabled . . .

  1. Add SBUsesNetwork to the Info.plist
  2. Change its type to Boolean
  3. Add a check mark to enable

Here is handy little project that detects whether or not your application has access to a WiFi network:

Download TestWifi_3.0.zip

Here is another handy little project that detects whether or not your application has any network access:

Download NetConnectDetection_3.0.zip

Feel free to use any of the above code in any way you wish. I am providing it in the hopes that it will help save someone from the headache that I experienced all day yesterday trying to get network detection to work ;-)

If you find any errors or corrections please notify me and I will update the sample apps. Thanks!

Tagged with:

Here’s how to remove the shinny gloss look that is automagically added to your app icon by xCode. Sometimes you just don’t want to look like everyone else ;-)

You have to add the line

UIPrerenderedIcon

to your Info.plist file. Change its value to boolean and then add a check mark like below . . .

gloss1

That will change this into this :

gloss2

Tagged with:

Here’s a handy code if you would like to add a button to your app that allows users to click it and be taken directly to a search listing of ALL your apps on the iTunes App Store. (see below) This is alot handier than adding a button/link to each individual app ;-)

Tagged with:

If you would like to launch the SMS app and send a predefined message use the code below

Tagged with:

If you would like to add a button to your application and have it launch the Phone app to dial a pre-defined phone number use the code below.

Tagged with:

This has got to be one of the top questions asked by new app developers. “How do I hide the UIStatus Bar?”

You can use the code snippet below or add UIStatusBarHidden to your info.Plist file, change it’s type to boolean and add a check mark to the box.

Tagged with:
San Diego Web Strategy Development