Updating SceneKit WWDC 2013 slides for Xcode 7

With recent changes to the AppKit headers, you need to make a couple of changes to the WWDC 2013 SceneKit Slides code to get it to build. There are some cool examples in that year’s talk/sample code that didn’t make it into 2014’s.

In the ASCPresentationViewController, switch from a method declaration for the -view superclass override to a property in the header, and specify @dynamic for that property in the implementation.

@property (strong) SCNView *view;

//- (SCNView *)view;

 

@dynamic view;

//- (SCNView *)view {

//    return (SCNView *)[super view];

//}

I also updated the .xcodeproj to current standards, and fixed a couple of int/NSInteger/NSUinteger mismatches.

I’ve submitted it to Apple as rdar://23829155. In the meantime, here are the diffs:

diff --git a/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.h b/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.h
index 7d66316..bb0e54f 100644
--- a/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.h
+++ b/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.h
@@ -55,7 +55,9 @@
@property (weak) id <ASCPresentationDelegate> delegate;

// View controller
-- (SCNView *)view;
+// Hal Mueller change: make this a property, @dynamic, to compile under Xcode 7/10.11 SDK
+@property (strong) SCNView *view;
+//- (SCNView *)view;
- (id)initWithContentsOfFile:(NSString *)path;

// Presentation outline
diff --git a/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.m b/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.m
index 46d9e00..1c914b6 100644
--- a/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.m
+++ b/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCPresentationViewController.m
@@ -91,9 +91,10 @@ typedef NS_ENUM(NSUInteger, ASCLightName) {

#pragma mark - View controller

-- (SCNView *)view {
- return (SCNView *)[super view];
-}
+@dynamic view;
+//- (SCNView *)view {
+// return (SCNView *)[super view];
+//}

- (id)initWithContentsOfFile:(NSString *)path {
if ((self = [super initWithNibName:nil bundle:nil])) {
@@ -660,12 +661,12 @@ typedef NS_ENUM(NSUInteger, ASCLightName) {

#pragma mark - Misc

-CGFloat _lightSaturationAtSlideIndex(int index) {
+CGFloat _lightSaturationAtSlideIndex(NSInteger index) {
if (index >= 4) return 0.1; // colored
return 0; // black and white
}

-CGFloat _lightHueAtSlideIndex(int index) {
+CGFloat _lightHueAtSlideIndex(NSInteger index) {
if (index == 4) return 0; // red
if (index == 5) return 200/360.0; // blue
return 0; // black and white
diff --git a/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCSlideTextManager.m b/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCSlideTextManager.m
index ce17c6f..cdc12a4 100644
--- a/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCSlideTextManager.m
+++ b/SceneKit_Slides_WWDC2013/Scene Kit Session WWDC 2013/Sources/ASCSlideTextManager.m
@@ -71,7 +71,7 @@ static CGFloat const TEXT_FLATNESS = 0.4;
return self;
}

-- (NSColor *)colorForTextType:(ASCTextType)type level:(int)level {
+- (NSColor *)colorForTextType:(ASCTextType)type level:(NSUInteger)level {
switch (type) {
case ASCTextTypeSubtitle:
return [NSColor colorWithDeviceRed:160/255.0 green:182/255.0 blue:203/255.0 alpha:1];

Brent Simmons: Notes from Mac programming class guest lecture

Last week, Brent Simmons was kind enough to visit the Mac programming class I’m teaching. He’s posted the notes from his talk online:

Notes from Mac programming class guest lecture: “The idea behind the lecture was to talk about what makes a great Mac app. I took that as an excuse to talk about everything from work habits to UI to marketing. “

(Via Brent Simmons inessential.com.)

Timeline 3D on sale

BeeDocs is running a Macworld Expo special for their wonderful app Timeline 3D. Through January 11, it’s only $30, less than half price.

I’ve been using this app for some personal history and genealogy stuff. But the prospects are really unlimited. Timeline 3D speaks XML. It can import RSS feeds, iCal calenders, iPhoto images, and other formats. It communicates directly with NetNewsWire, iPhone, iTunes, iCal, and Contacts.

This is really a cool, beautiful product. Support response has been fast and helpful. You should buy this app.

ATI Radeon 9600 graphics card and G5 Mac under Leopard

The ATI 9600 AGP card does not appear to be a good choice for upgrading the graphics on a dual G5 Mac.

Yesterday and today I went through at least a dozen cycles of shut down computer, open computer, swap graphics cards, close computer, reboot in safe mode, reboot in normal mode, in a failed attempt to upgrade my dual G5 Mac desktop’s graphics card. I’d really like to get my 30″ Cinema Display connected to this machine.

I just got off the phone with a senior support tech at ATI/AMD. He told me that there are known issues with this particular card in a G5 running the latest sub-version of Leopard (10.5.5). He suggested that I revert the computer to 10.5.4 or earlier, which I am not willing to do.

I asked about driver updates. They are no longer provided separately by ATI. The senior tech I spoke with says he believes there will be a compatible driver update in Leopard 10.5.6. I’m just going to RMA the card. I’ll just live with the older graphics card, and the smaller monitor, until I replace this G5 with an 8 core Intel Power Mac (how many days until MacWorld?).

SkunkTracker 0.9 posted: AIS for Mac OS X

I have just posted SkunkTracker prerelease version 0.9 at http://www.mobilegeographics.com/skunktracker/.

I’m fairly pleased with the search capabilities. Right now I’m working on making the launch and the graphics faster, and on improving the graphic “fit and finish” and basic workflow.

There’s a sometimes live map of Seattle area shipping, produced by the KML export feature of SkunkTracker, at http://www.mobilegeographics.com/skunktracker/seattle.html.

Let me extend special gratitude to all of my classmates at Big Nerd Ranch, the gang at Seattle Xcoders, and especially Aaron Hillegass and Rocco Bowling, for helping me get this far.

SkunkTrackerScreenSnapz001.png

SkunkTrackerScreenSnapz002.png