Get In Touch
This form does not yet contain any fields.

    Entries in ios (7)


    Text Input in UIAlertViews


    iOS developers have been hacking away at trying to find a good solution for presenting users with a text input on a popup.  Some developers have been successful at getting this to work, but it has never been a pretty or simple solution. iOS 5 provides several simple solutions to this problem with the new UIAlertViewStyles that are now available.

    UIAlertViewStylePlainTextInput is the most simplistic of the new styles and presents a standard UIAlertView with an embeded UITextField.  In order to receive the text input into this UITextField, you must implement the UIAlertViewDelegate method didDismissWithButtonIndex.  A simple example implementation...

    UIAlertViewStyleLoginAndPasswordInput works exactly the same except you receive two text fields for input, the username and password.  Again you can get these contents form the UIAlertViewDelegate method didDismissWithButtonIndex, with the login field having a index of 0 and the password field having an index of 1.


    Simple ARC explanation

    Dont worry about it.  Memory management is one of the hardest concepts for new developers to wrap their heads around. With iOS 5 and ARC this issue is mitigated.

    Developers can alloc and init objects like they normally would, but now the compiler takes care of cleaning up memory when the object is no longer needed.  In other words, stop worrying about it, you no longer need to be obsessive about writting a release everytime you write alloc. In fact you can remove dealloc functions from your code altogether.  This even works for Blocks, stop worrying about including the autorelease.

    There is even an automated way to convert old code to ARC, within Xcode go to Edit --> Refactor --> Convert to Objective-C ARC. This will walk you through step by step how to convert your code and even do a precheck to make sure nothing will break.

    There are also compiler flags you can provide to opt-in or opt-out of ARC.  This is incredibly useful if you are using pre-ARC libraries, so you can have ARC on the rest of the project and use retain/release on the older code.

    Opt-in Flag = -fobjc-arc

    Opt-out Flag = -fno-objc-arc


    Apple's initial baselines also are showing that there is a healthy performance gain of 2.5x faster than a normal retain/release.  It is 6x faster than autorelease as well.

    Stop Worrying. Start Developing.


    Chameleon - UIKit for OS X

    With the success of Apps on the Mac App store, such as Pixelmator, many devs are sizing up how they can port their existing apps over to OS X.  Today with the release of Chameleon, developers now have the ability to port their existing iOS code directly to OS X.  Chameleon is a byproduct from IconFactory, as they created this framework while porting Twitterific to allow for a direct port from iOS into OS X.  

    Chameleon is definately a work in progress, with 60% of UIKit having been ported so far.  There are some notable missing parts of UIKit, such as the UITabBar and UISwitch.

    Historically the mantra of write once, run everywhere has yielded some poor products, but I'm interested to see how I can leverage Chameleon and specifically how well that will perform on OS X.

    Chameleon on GitHub

    Support Chameleon via Donation


    Chrome extensions for iOS Developers

    I switched from Safari to Chrome a few months ago and have enjoyed the speed improvements and the many useful extensions.  Although being an iOS developer there are some things that do not work as well in Chrome as they did in Safari.

    The first is iTunes Connect.  When accessing the Sales reports in iTunes Connect from Chrome, you will see the loading spinner, just spin and spin.  After a few refreshes you can finally get the report to come through.  This can be frustrating as this is the only source of information for developers on how many apps have been downloaded.  Luckily there is an extension called iTunes Connect fix which fixes this problem.  Just install this extension and the reports load immediately just like Safari.

    The second is searching for developer documentation within Chrome.  There is a great shortcut extension that will let you search directly within Chrome for content within the iOS and Mac documentation.  AppleDocsChrome will help speed up your search results and makes finding documentation content even easier.

    Another great extension is the AppStore Instant Extension which allows you to get Google Instant like search results from the AppStore.


    Get App Store Reviews with 1 line of code

    With over 350,000+ apps in the Apple App store, getting your app noticed is becoming more and more difficult.  There have been many different approaches to solving the App discovery problem, but even with these solutions they all depend on one common factor, Reviews.  What makes this even more of a difficult problem is getting your users to the App store in a happy and willing state to perform a review.  Apple finally got rid of the awful idea of prompting to review an App at the point of uninstall, which was notorious for generating high levels of bad reviews for apps.  Who is happy with an App that they are removing?

    The best approach that I have seen apps take so far is to politely ask for a review at different times in the application.  This is best done after the user has used the app over time, and ideally after a positive experience in the app.  A good example would be to ask for a review after a user unlocked an achievement.  The logic would be that they are in a happy state as a result of their achievement, so would be more likely to review your app.

    Nick Lockwood from Charcoal Design has taken a lot of the pain out of this process for developers.  He has published a simple class, iRate, that can be used in any iOS app to prompt app users to review the app.  It is incredibly simple to get this code working with your existing app.  Using the default configuration you can have this code up and running in your application in as little as one line of code.

    First download the class from GitHub here

    Second import the iRate class into your project.

    Third add the following line to your App Delegate code with the App Store Id for your app.

    Thats it!  Now there are many great options you can use to customize the appearance, and when to have the review prompt displayed, but if you leave it at the default settings it will work fine also.  I would encourage you to read the documentation over at GitHub to see the many options you can use.