iPhone simulator screen shot util
It’s fairly easy to take a screen shot from the iPhone itself, but taking a screen shot from the iPhone simulator during development has been somewhat of a pain….until now!
I just came across a very simple little tool that will take great snapshots from the iPhone and format a few different ways. Check it out!
http://www.curioustimes.de/iphonesimulatorcropper/index.html
Convert .plist to XML and back
I am trying to set up my iPhone application so my application specific settings can be found in the iPhone’s “Settings” page. To do this I need to create a folder in my MonoTouch project called “Settings.bundle”. Then add a file called “Root.plist”. .plist files are a binary property list file, there is no validation so watch your fat fingers!
One of the errors I ran into while doing this was “text node cannot appear in this state”. Something is not quite right with the Root.plist file, so I decided to convert it from .plist to .xml so I can edit the file. Then convert it back and the error is gone. Not exactly sure why, but it works.
Open the “Terminal” and enter the following commands:
plutil -convert xml1 Root.plist.xml Root.plist <— converts binary .plist to .xml
plutil -convert binary1 Root.plist Root.plist.xml <— converts .xml to binary .plist
If I discover more I’ll post updates…
Windows 7 Command Window from Here
One of the great PowerTools has been adding a context menu to Windows explorer that will start a command window at the given folder you’re on in explorer. In Windows 7 it is now part of explorer. To get the context menu simply hold down the “Shift” key and right-click on the folder you want for a command window. Then select “Open command window here” and BAM, there you go.
Open multiple solutions in MonoDevelop
The one thing driving me nuts about the Mac OSX was the inability to open multiple instances of the development environment MonoDevelop. I found in the MonoDevelop 2.0 release notes it now supports opening multiple solutions within one MonoDevelop instance.
There are two ways to accomplish this. On the welcome page when selecting a solution to open, hold down the “control” key. Or, when opening a solution un-check the “Close current workspace” checkbox.
MonoTouch issue with MessageTransport
Posted by merickson in Dev, MonoTouch, Web Services on February 20, 2010
Given the limited security options with a MonoTouch iPhone application, I’m trying to use BasicHttpSecurityMode set to TransportWithMessageCredential. However, there is an issue when I make the async call from the MonoTouch app. I’m getting a 500 Internal Server error. The details can be found at the following locations:
https://bugzilla.novell.com/show_bug.cgi?id=573326
http://forums.monotouch.net/yaf_postst372_WCF-with-transport-and-basic-auth.aspx
Novell commented this would be fixed in MonoTouch 1.4.100, however I downloaded it (1.4.1.00.5224) this morning and it doesn’t seem to be fixed yet.
MonoTouch Issue with DataContracts with Collections of Themselves
Posted by merickson in MonoTouch, Web Services on February 6, 2010
I am having an issue where the MonoTouch libraries for the iPhone don’t seem to be able to parse a response from a WCF web service call that returns a complex type, in this case a collection of server objects. I’ve created a test client using plain old ASP.NET and made the call using the same proxy code generated using SLSvcUtil tool. The ASP.NET client has no issues making the same calls in the same order. What’s even more puzzling is that it does not seem like the method call from the iPhone is not even making it to the WCF web service.
UPDATE (2/6/10): Looks like it’s an issue with a DataContract containing a member that is a collection of itself.
UPDATE (2/17/10): The MonoTouch dev team has acknowledged this is a bug.
namespace blah.Service.DataContracts { [CollectionDataContract(Namespace = "urn:blah.Services.DataContracts", ItemName = "TaskCollection")] public partial class TaskCollection : System.Collections.Generic.List<Task> { } }
namespace veSentry.Service.DataContracts { [DataContract(Namespace = "urn:veSentry.Services.DataContracts", Name = "Task")] public partial class Task { [DataMember(Name = "Name", IsRequired = false, Order = 0)] public string Name { get; set; } [DataMember(Name="SubTasks", IsRequired = false, Order = 1)] public TaskCollection SubTasks { get; set; } } }
Microsoft clients (ie. ASP.NET) did not have any issues de-serializing this.
So now I need to refactor the DataContracts and the Collections so there are no circular references so to speak.
How to determine version of MonoTouch
I was running into an issue that apparently had been taken care of since version 1.3 of MonoTouch so I tried to find out which version of MonoTouch I’m running with. To do this you have to run Terminal on your mac (it’s under applications/utilities) and then execute the following:
/Developer/MonoTouch/usr/bin/mtouch –version
Turns out I’m running 1.4.5.4799, so it’s on to more troubleshooting!
The Dreaded Interview
Posted by merickson in Uncategorized on January 8, 2010
Up until today, I’ve usually been very comfortable interviewing. I’ve been on several interviews and nailed a very good majority of them. I’ve been without work for the past 4 months and finally got an interview with a company with a progressive development team. The guys interviewing me had great questions, some of which stumped me, which to me is great….I love a challenge. Then came some canned “logic” questions. Now I pride myself on my knowledge of math, I love math and did very well in Math through college. The first question was if you have an item that costs $80 and it’s marked down 20%, how much is that item. I completely locked! You would have thought these guys had asked me to derive Cosine! Holy crap, why couldn’t I come up with the answer! So I had to pass, OMFG! Is this a sign of age? Did I over think it? Was it too simple? LOL! I dunno, but this one is gunna haunt me for a while. LOL!
C# iPhone Development
Novell has introduced a nice product that should boost development for the iPhone, not that there aren’t already too many apps for that! MonoTouch.Net is a development environment allowing C# developers to leverage their C# experience to write applications for the iPhone. Traditionally, iPhone apps are written using Objective-C. Objective-C is basically an object oriented C language with SmallTalk type messaging added in. When I was researching what to use, many people warned to stay clear of Objective-C to avoid frustration. Anyway, if you want to do iPhone development and know C#, but don’t know Objective-C, check out MonoTouch from Novell.
Burger Joints
Posted by merickson in Foodie Stuff on November 25, 2009
There are a couple of new burger joints in our area so the wife and I decided to give them a try. The first was Smash Burger which is across from the Dayton Mall in Centerville. I like what they are trying to do with fresh ingredients and Angus meat, but MAN there was just too much grease for me. The buns became soggy from the grease and the onion rings were dripping with it. I know fat is flavor, but too much grease is disgusting! Both the wife and I had food aversions for the rest of the day. We’re definitely not going back there.
Then we tried Five Guys Burgers and Fries which is located near Sam’s club in Centerville. This is right next door to Rue Domaine, one of the restaurants on my list to try! There was nothing really exciting about this burger place, but they did not have the grease amounts of Smash Burger! They have free peanuts for while you wait, and everything is very low maintenance. Even for dine-in you get your food in a paper bag with the fries at the bottom. We’d probably go there again, but it’s not something we’ll crave.