Tech and a few other things RSS 2.0
# Sunday, June 06, 2010

When starting a new project you have the ability to  select a template of premade projects. Two examples of this are
    1. Navigation Based Application
    2. View Based application

When these templates are selected xCode will create the appropriate base controller for you in interface builder, such as "Navigation Controller" or a "View Controller" it will also create the appropriate classes for you with some of the most commonly used delegate and datasource methods along with the appropriate methods to override.

With a new project and selecting Window-based application, you are simply creating a blank slate in which you have to create nearly everything. It's rarely advantageous to use this unless, you are creating something outside the templates offered or you are learning how all the pieces fit together.

Sunday, June 06, 2010 7:05:58 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Objective C | xCode
# Sunday, May 09, 2010

The Problem:
I was getting a white screen with no data in a UITableView on it in the iPhone simulator.

The Solution:
I had my initialization code for the array in the the "loadView" method and not the "viewDidLoad" method

Explanation:
Don't read self.view in -loadView. Only set it, don't get it. The self.view property accessor calls -loadView if the view isn't currently loaded. There's your infinite recursion. I'm guessing UITableView calls a View [pretty good guess since "view" is in the name. :)] which in turn caused my recursion.

This was a stupid little error that caused me about 30 minutes of my life due to the fact I didn't get any build errors. A simple copy and paste moved me forward.

Update: I think it might be important to distinguish the differece between loadView and viewDidLoad. (below)

loadView is the method in UIViewController that will actually load up the view and assign it to the "view" property. This is also the location that a subclass of UIViewController would override if you wanted to programatically set up the "view" property. viewDidLoad is the method that is called once the view has been loaded. This is called after loadView is called. It is a place where you can override and insert code that does further initial setup of the view once it has been loaded.

Sunday, May 09, 2010 5:55:43 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
iphone | Objective C | xCode
# Tuesday, April 13, 2010

I'll keep this post short. I read this book to prepare myself for iPhone development and give me a deeper understanding of Objective C. This book is probably the best book to start learning Cocoa Programming currently on the market. It gives chapter by chapter examples with exercises to follow along with. The only shortcoming of the book is that it's a bit dated to what the current xCode version is. A few of the examples might take the novice for a spin (which means it took me for a spin, sometimes a quite frustrating spin) because the step by step instructions are not exactly correct due to the fact some of the menu items have changed or been rearranged. Outside of a few minor issues, like the one I mentioned earlier, it's a pretty fun book and I would recommend it to other experienced programmers. Hopefully Mr. Hillegass will come out with a newer version.












Things covered in the book

Memory Management
Target/Actions
Helper Objects
Key-Value Coding; Key-Value Observing
NSArrayController
NSUndoManager
Archiving
Basic Core Data
Nib Files and NSWindowController
User Defaults
Using Notifications
Using Alert Panels
Localization

The list keeps going, it really covers all you need to know for having a strong hold on the basics.

Tuesday, April 13, 2010 9:10:59 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Mac OS X | Objective C | readings | xCode
# Tuesday, March 09, 2010


Error Readout:
error: A valid signing identity matching this profile could not be found in  your keychain

The Problem:

In Keychain Access it reads the error above.

The Solution:

This can be cause by several issues. The highest probability is, you didn't install the certificate you created in the distribution or development page of "certificates" in the iPhone Provisioning Portal.
Tuesday, March 09, 2010 9:37:21 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
App Store | iphone | xCode


Error Readout:
Code Sign error: The identity 'iPhone Distribution' doesn't match any valid certificate/private key pair in the default keychain

The Problem:

I try and build my application and I get the error above

The Solution:
Many things can cause this error. The error is probably caused by one of the steps being done incorrectly in the Program User Guide. Most won't like reading this, but the best way to fix this is to go back and follow, very precisely, the steps in "Program User Guide." In case the link changes you can get to the pdf by going to http://developer.apple.com/iphone, logging in, clicking "iPhone Provisioning Profile" and in the box on the left hand side of the screen titled "Provisioning Resources," you can download the Program User Guide pdf.

Explanation:
Yes, we ALL wish this process could be more streamlined, and require less reading, but it doesn't. If you want to get that app out there, suck it up, read the 60 pages [lots of pictures :) ] and be done with it.
Tuesday, March 09, 2010 9:14:18 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
App Store | iphone | xCode
# Saturday, February 27, 2010
Making an iPhone icon is way easier than I had anticipated. You don't need to round the corners, you don't have to give it the little glow as if the sun is shining down upon it. Simply make your icon in a 57x57 png and the iPhone SDK does the rest for you. Here is a link to some good apple documentation on making an iPhone Icon. See the icon I created below (1) and the icon that showed up once I plugged the image into xcode (2).


1.             2.

     
 

Saturday, February 27, 2010 9:41:41 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
iphone | xCode
Navigation
About the author/Disclaimer
        
My name is Ben Coffman. I'm in love with all things Mac yet I make a living in .NET. I view this as well rounded. When I turn the internet off I focus on family, random hobbies, and sharing moments in life.

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Ben Coffman

Archive
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
All Content © 2010,

Sign In