ChooseBot 2.0 Released!
Saturday, April 07, 2012, by Sebastian Dwornik

Siri can't make decisions for you.  But ChooseBot can!

ChooseBot 2.0 Released!

 

Create a Simple iOS On-Screen Logging Console
Tuesday, March 13, 2012, by Sebastian Dwornik

Sometimes it can be useful to have a simple text console on-screen within your iOS app to output status info and other messages that can help analyze a running app.

Hence the creation of textViewLog:() function.

Simply add the following UItextView control setup.

@property (nonatomic, strong) IBOutlet UITextView *textConsole;
@synthesize textConsole;

Insert a UItextView control within your View and connect its outlet to our property.

UItextview connections


Finally drop in the code below.

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// It's almost like NSLog, but directed to a UITextView control.
//
// usage example:  [self textViewLog:@"%@", myVar];
//
- (void)textViewLog:(NSString *)firstArg, ...
{
    va_list args;

    va_start(args, firstArg);

    NSString *log_msg = [[NSString alloc] initWithFormat:firstArg arguments:args];

    self.textConsole.text = [NSString stringWithFormat:@"%@%@\n", self.textConsole.text, log_msg];

    // Support auto-scroll.
    NSRange range = NSMakeRange(self.textConsole.text.length - 1, 1);
    [self.textConsole scrollRangeToVisible:range];

}


And voila!  You have yourself a quick and simple on-screen logging console.

iPhone 4 with console

You can download the above sample project too.


 

Auto-incrementing Build Numbers in Xcode
Sunday, February 19, 2012, by Sebastian Dwornik

Add run script within XCode
Thanks goes to Fredrik Olsson's article and the helpful commenters that shared their own tweaks to this quick and simple solution.

Simply select the app 'Target' and add the following text to a 'Run Script' within your 'Build Phases' tab.




# Auto Increment Version Script
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"


XCode run script insert


After which, whenever you perform a Build operation, the "Build" number will automatically be incremented.


XCode run script results


Optionally, if you have multiple 'Targets' and want to keep their 'Build' numbers in-sync, you can simply just modify the script to update both .plist files during a Build operation.

# Auto Increment Version Script
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/ChooseBot/ChooseBot-Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/ChooseBot/ChooseBotLite-Info.plist"

Make sure you then add 'Run Script' within both of your Target 'Build Phases' tab.


Whether you choose to display this 'Build' number in your app is up to you, but it helps track the app a little better.

 

It’s more than just custom software. It’s a relationship.
Thursday, February 02, 2012, by Sebastian Dwornik

The customer is always right

Well, .. no, not really.

While developers do need to fully understand the customer’s expectation, the customer's don’t always realize the “right” way to execute it.  That’s the developer’s domain in designing the app properly.

Developing custom software for clients is much more than just writing code.

It requires a level of ownership and responsibility to execute a polished product with an accurate UX experience that doesn’t resemble a VB app from 1997.

Just because the client wants a text field in the middle of the screen, doesn’t mean it belongs there.

Developers who care about such design details usually cost a little more, but the work done is then also of a higher caliber.  Because human-to-human-to-machine translation is not trivial and requires patience.

And in the end, it’s more than just custom software.  It’s a relationship.


bad user requirements

 

Nothing happens until there's a sale
Wednesday, January 04, 2012, by Sebastian Dwornik

... and the first customer is you.
Flying man invention

Because if you can't sell the idea to yourself, how will you ever be able to sell it to someone else.


 

Happy New Year 2012
Sunday, January 01, 2012, by Sebastian Dwornik

Happy New Year 2012


May prosperity and good luck smile upon you all.


Now get back to work!  ;)

 

Appcessories Give iPhone More Senses
Thursday, December 01, 2011, by Sebastian Dwornik

iPhone sixth sense

Extending the iPhone into real world applications has been a growing trend, and now with the advent of appcessories, concepts like heart rate monitoring and other environmental/urban sensing can gain popularity to grow a more sentient city through new intelligent sensors that connect to your iPhone.

It’s like gaining a sixth sense, and possibly beyond.

 

CLI Control of Wi-Fi in OS X
Tuesday, November 08, 2011, by Sebastian Dwornik

CLI Control of Wi-Fi in OS X



I needed to be able to switch between two Wi-Fi connections in OS X during development of a certain project and it quickly became disruptive to my workflow to always reach for the mouse and use the menu bar.









So I made the following alias commands for use within Terminal on the command line interface.

alias adhoc='networksetup -setairportnetwork en1 <adhoc SSID>'
alias wifi='networksetup -setairportnetwork en1 <my wifi SSID> <WPA2 password>'

Hope this helps others, as it greatly improved my own efficiency.

 

Strip Trailing Whitespace in Xcode 4
Tuesday, November 01, 2011, by Sebastian Dwornik

XCode 4 is great.  But it has some annoyances.  One of which is inserting whitespaces in your code as if they were breadcrumbs to mark your path in case you get lost.

Thanks to Brian Cardarella for originally working this out, I simply modified his script to handle *.h and *.m files.

Simply create your own shell script  (e.g. stripWhitespace.sh) and insert the following contents:

#!/bin/sh

find . -name "*.[hm]" -type f -print0 | xargs -0 sed -i '' "s/[[:space:]]*$//"


Lastly set a 'Behavior' in XCode to run the script with a shortcut.

strip whitespace in XCode

Voila!

It will clear all of the whitespace within your entire projects directory for all files ending in *.h and *.m .

Enjoy!

 

The Importance of Design
Wednesday, October 12, 2011, by Sebastian Dwornik

REUTERS/On Courtesy/Jonathan MakIn my youthful years of programming computers I threw caution to the wind and jumped straight into code.  For all the talk about specs., documenting, and mockups, my mind raced far too quickly to be slowed down by UI design and other considerations.

Now over a decade later, with my brain a little wiser, and albeit a little slower, I realize the truth that although code is no doubt important, design trumps all.

This isn’t news.  But a refreshed realization, especially with the passing of Steve Jobs, who above all else, cherished and expressed the importance of good design.

Thank you Steve, for making us care about design again.


 

Welcome to my App World

My name is Sebastian Dwornik and I am an entrepreneur located near Toronto, Canada.

Here you will find my thoughts on all matters regarding software, design, business, and sometimes life in general.

Have feedback? Don’t be shy and post your comments within the forum.


CONNECT WITH US

Twitter Facebook
Linkedin Rss

profile for Sebastian Dwornik at Stack Overflow, Q&A for professional and enthusiast programmers

Categories
Archives

April (1)
March (1)
February (2)
January (2)

Past archives (2011)

Past archives (2010)

Past archives (2009)

Past archives (2008)

 
 
Copyright © 2007 - 2012 Applied PDA Software, Inc. Fresh Lime Studio
All products mentioned on this web site are owned and copyrighted by their respective companies.