Tag: Objective-C

Play Button iTunes Patch Updated to Version 1.1

I have had a backlog of changes that I wanted to make to the iTunes patch.  I finally took some time this weekend to work on those and release version 1.1.  The major improvement in this version is the check for System Integrity Protection.

Take a look at this commit for more details about this round of changes.  You can download the latest version on the project page.

Screen shot of the v1.1 patch on macOS Sierra

Play Button iTunes Patch GUI App is Live!

Play Button iTunes Patch GUI app is live!

Read full post...

Play Button iTunes Patch GUI App Almost Ready to Go Live

Play Button iTunes Patch GUI app is almost ready to go. You can download the beta version from the project page. Source code is in the gui branch.

The new interface

Migrating Play Button iTunes Patch to a GUI App

I am working on migrating the Play Button iTunes Patch to a GUI app. Here is a sneak peak of what it looks like so far. You can see the source code in github.

This has been an interesting project because I have had to learn about elevated privileges in OS X, which apparently isn’t a very common use case. I am hoping that this version will be simpler and minimize the xcode command line tool installation.

Alpha Version

Object is not key value coding compliant

Lately I have been playing around with Objective-C development on mac. As I was working through a tutorial I kept getting the following error for a calculated read-only property.

[<NSManagedObject 0x2000c3c20> valueForUndefinedKey:]: the entity Expense is not key value coding-compliant for the key "filename".

Below is the definition of the class.

// Expense.h
#import <Cocoa/Cocoa.h>
@interface Expense : NSManagedObject {}
@property (readonly) NSString* filename;

// Expense.m
#import "Expense.h"
@implementation Expense
- (NSString *) filename {
	return @"TestingPath";

The class definition is OK so the error didn’t make sense. After some troubleshooting I found out what was causing this. Since this was my first application I didn’t know that I had to tell the model what class it should be using, and, unfortunately, the book that I was using didn’t mention it either (or maybe I missed it).

Anyways, if you get this error then make sure that you have associated the class with the model. To do this you have to specify the class name under “Class” in the model definition (see screenshot below).

Make sure to specify the class in the model (highlighted field)