June 20, 2012, 10:13 am
If you are ever planning to have someone from a country other than the U.S. use your iOS application, then I would go through right now and check for all the floatValue and doubleValue methods of NSString, and get rid of them if the NSString is coming from data that the user can enter. Needless to say, those users in Europe who use a comma for the decimal separator and a period for the thousands separator will notice some hilarities when using your app.
I put together a quick method in my NSString categories code (notice that it uses self as the source string) that I am using to avoid this very issue. Here is what it looks like:
- (double)localeSafeDecimalValue
{
NSNumberFormatter *decimalStyle = [[NSNumberFormatter alloc] init];
[decimalStyle setNumberStyle:NSNumberFormatterDecimalStyle];
NSNumber *n = [decimalStyle numberFromString:self];
[decimalStyle release];
return [n doubleValue];
} |
- (double)localeSafeDecimalValue
{
NSNumberFormatter *decimalStyle = [[NSNumberFormatter alloc] init];
[decimalStyle setNumberStyle:NSNumberFormatterDecimalStyle];
NSNumber *n = [decimalStyle numberFromString:self];
[decimalStyle release];
return [n doubleValue];
}
This will work as long as the user is entering numbers in the format that their International Settings are set to on their iOS device.
BTW, happy birthday to Michael Anthony, bass player and backup singer of Van Halen and Chickenfoot fame.
June 17, 2012, 8:56 pm
Thanks to everyone who turned out first thing on Friday morning for my presentation on utilizing open source iOS projects. This was the second time I gave this presentation, and this time it went a bit better, as I was not constantly switching back and forth between the slides and Xcode.
If you would like to download a PDF of the presentation, here is a link:
Open Source iOS Projects presentation v2
Also, if you would like to download a ZIP file of all of the demos that I did, here is a link for that:
Open Source iOS Projects demos v2
BTW, happy enactment day to the Smoot-Hawley Tariff Act, enacted this day in 1930. Those “Save Ferris” fans out there should remember this piece of legislation well.
May 7, 2012, 12:51 pm
As a follow up to Stir Trek, thanks to my friend and former co-worker John B., who reminded me that if you have a lot of inserts you want to do, execute this command on your database before you get started:
Then, after all your inserts have been sent , execute this:
If you do this, I promise that your users will be much more happier. (In my iOS app instance, the insert times went from about 90 seconds to 0.7 seconds.)
BTW, happy birthday to Amy Heckerling, who directed two of my all time most favorite movies, National Lampoon’s European Vacation and Johnny Dangerously.
May 4, 2012, 9:25 pm
It was a fun time today attending the Stir Trek Avengers Edition developer event in Columbus, Ohio. I especially enjoyed the Scott Hanselman sessions on becoming more productive and on ASP.NET. And the movie was real loud.
Also, I would like to thank all the people who downloaded my Stir Trek 2012 app (link redacted, app has been removed from the App Store) for the iPhone. Yesterday’s download count was almost larger than the entire download count for the Stir Trek app I did in 2011.
BTW, to continue the movie theme, Happy Star Wars day to everyone.
April 27, 2012, 8:55 am
Jennifer Marsman gave a rousing and lengthy presentation on Metro and Windows 8 last night to a packed house meeting of the Central Ohio .NET Developers Group. She almost makes me want to do a Metro app.
Prizes returned, and believe it or not, my name was drawn first for the door prizes. I think that it is a conspiracy that the prizes really suck when I win something. I walked away with a version 2 Code Complete book. And a cheer went up from the audience.
BTW, happy birthday to Ace Frehley, a true rock and roll icon. It was kind of a shame that Ace wasn’t playing with Kiss when they did the Dancing With The Stars Rock Week show a couple of weeks ago.
April 5, 2012, 9:34 pm
My 2012 Stir Trek app has made it through the review process and is available in the App Store. It is a free app and runs on iOS 4.3 or newer devices. Here is the link to the app:
Stir Trek 2012 (app link redacted, no longer available in the app store)
OK, it is basically the same app as last year and does not use the iPad natively. But download and enjoy it anyway. And hopefully rate it 5 stars with glowing reviews.
BTW, a sad day today, Jim Marshall of Marshall Amplification has passed away at the age of 88. Which means that he made it to eleven 8 times. Turn it up loud in honor of Jim.
March 28, 2012, 10:56 am
Jonathan Penn gave a presentation last night on using the UIAutomation classes in iOS and Instruments to do user interface testing of iOS apps. It was a very thorough presentation with lots of demos, which are always good. At my previous company, we tried to use UIAutomation to help out with entering of lots of data, but were stymied by something that sure looked like a bug in UIAutomation. Here was the Stack Overflow question I asked regarding this issue: (I accepted an answer that was not truly an answer because I wanted to get my accept rate back up to 100%)
iPhone UIAutomation button tap does not fire
I would love to get back into using UIAutomation, but it can take a long time to get it to do what you need it to do, and unfortunately I do not have the time I would like to spend on it.
By the way, if you have need of a mobile solution for your sales or work force, then please check out Routzy, an iPad only app that my current company just released last week. Here is a link to the product web site:
Routzy
And here is a link to the press release:
Coalesce Launches Routzy, iPad App Designed for Sales Professionals
March 27, 2012, 3:22 pm
It has been a while since I posted any misspelling and/or usage gaffs, so here goes something “special”.

This next one from a job posting isn’t a true misspelling, as it would probably get past your average everyday spell checker. Check the 4th bullet point.
And finally, I wouldn’t recommend clicking on the web story shown below if you happen to be working at a financial institution and you think that they might be red flagging certain employees for their web surfing.

Finally, Happy World Theatre Day to everyone.
March 23, 2012, 7:55 am
Last night, I was in attendance at a packed house meeting of the Central Ohio .NET Developers Group. The main topic was WCF by Paul Bahler, and the content was very informative. Almost a bit too informative, as he spent most of his time in Visual Studio showing how to do various tasks in the wonderful world of web services.
Unfortunately, there were no prizes to be had at the meeting (unless you count the Donato’s pizza), as the CONDG president forgot the prize box. There were calls for an impeachment.
BTW, happy birthday to David Tom, who I actually liked playing Billy Abbott on Y&R.
March 19, 2012, 3:39 pm
After rearranging the components of an iOS project around, all of a sudden the archive was giving a warning at the end:
Application failed codesign verification. The signature was invalid, contains disallowed entitlements or it was not signed with an iPhone distribution certificate. (-19011) |
Application failed codesign verification. The signature was invalid, contains disallowed entitlements or it was not signed with an iPhone distribution certificate. (-19011)
The strange thing is that if I went to the Verification button in the Organizer, everything was happy and the app passed initial validation.
But I figured I had best clear the warning anyway. As a result, my moving items around caused a path to become too long. The way that I fixed it was to go into the Behaviors in Xcode, Locations tab, and set the Derived Data path to a custom path that was much shorter than the normal library path that shows up there. Doing this and rebuilding caused the archive to go through normally.
The key to this was looking at this Apple web page and noticing that I was getting the “Failed to load provisioning profile from” message in my build output:
Technical Note TN2250
BTW, Happy Birthday to Billy Sheehan, one of the most talented and versatile performers that I have ever seen.