Featured Posts

How to background load and cache UIImageViews images It's often the case that the apps I am working on are required to download quite a couple, or even a few dozen, images and display them in a UIImageView. In looking online I found a few different methods...

Readmore

It sure does snow in Kansas! This week I am visiting my Grandmother in Kansas. Monday night I arrived at the farm just as the first snow was falling, and by Tuesday morning I couldn't have left if I wanted to. Here are some pictures...

Readmore

*Warning* Do not install software included in Panasonic... Background A while back I purchased a Panasonic camera that can not only take pictures, but also record video. I chose the camera because of this combination, in combination with it's optical zoom. Now,...

Readmore

UPS continues tradition of poor service Warning, rant ahead! I don't like posting such, but UPS is making my life miserable often enough that I feel I have to. Anyway, I purchased a product recently which the company shipped via UPS with...

Readmore

Suggestions to correct iTunes / iPhone music sync Recently I had a coworker who upgraded his iPhone to 3.0 find that he could no longer sync that iPhone with his iTunes music library on a Windows computer. It would, however, sync just fine on a Mac OS...

Readmore

  • Prev
  • Next

Apple // software Updates #1

Posted on : 27-06-2009 | By : Lane Roathe | In : Apple //

0

OK, so I am slowly going through and adding in all the various Apple // software I’ve written in the past. Here is what I currently have:

  • Apple Reference Magazine - The source code to the Apple Reference Magazine shell, including the browser and reader. I think it also includes all of the first issue data and articles (which my include further source). The source is 100% assembly, and well documented (really!). File is in "bxy" format (Apple //gs archive)
  • Lane DOS - I think this is the source to a version of the DOS I wrote for the Battletech series from Infocom, but I'm not 100% sure on that.
  • Applesoft BASIC code - General stuff written in Applesoft - not sure at all what is in this archive.
  • Copy Protect - I think this is my track/sector syncing copy protection scheme I submitted to some Apple // hackeresque magazine back in the day.
  • Copy Protection Notebook - This is the various sources to the "Copy Protection Notebook" (aka the "Tome of Copy Protection"). If you ever wanted to know how to do copy protection, get this source! Half tracks, quarter tracks, perfect tracks, sync tracks, sync sectors, and more...

Let me know if you find any issues, I have not yet setup my gs or an emulator so I can check these out.

Suggestions to correct iTunes / iPhone music sync

Posted on : 20-06-2009 | By : Lane Roathe | In : Hints, iPhone/iTouch

2

Recently I had a coworker who upgraded his iPhone to 3.0 find that he could no longer sync that iPhone with his iTunes music library on a Windows computer. It would, however, sync just fine on a Mac OS X computer. Also, it was correctly syncing other items, such as his app store applications.

Googling turned up a few suggestions that we tried:

  • Turning off the phone
  • Removing all music and re-adding it (ie, remove from iTunes DB, NOT from the hard drive!)
  • Resetting iTunes sync settings (preferences->devices then clear sync history or forget all remotes)

None of these worked, but we did find the answer with a last resort effort.

Solution: Uninstall all Apple software (you probably only needed to uninstall iTunes, but this is what we did) and then re-install iTunes.

This uninstall/reinstall should allow you to again sync an iPhone with your music library.

CAContextInvalidLayer and setFence:count

Posted on : 07-06-2009 | By : Lane Roathe | In : Development, featured, iPhone

Tags: , ,

0

So there I was, up for nearly a day straight and have figured out the certificate issue that was preventing my program from running on my iPhone after upgrading to SDK 3.0 beta 5.

On the device I was getting this error: CAContextInvalidLayer - CALayer already attached to a context while on the simulator I was getting this error: setFence:count: called more than once per transaction. Cryptic messages that googling for solutions found no answers to.

After many hours of investigation and trial and error, I checked out older revisions of my code base (gotta love svn, or any revision control system for that matter!) until I arrived at a build that installed and ran on the device. From there I started doing file by file compares with the next version (which didn’t install) looking for anything that might be the cause.

Finding nothing obvious, I started implementing each change one by one. The difference between the revisions were minor and few in count (as any good checkin should be) so this didn’t take long… and I arrived at a solution!

My application was using several layers to create visual effects. At one point I made a “change that will make no difference”, and so minor I kept ignoring it in my code reviews! However, this code was the cause of all of my issues… but only long after the actual code had been run.

The problem came down to how I created my layers. I had started out very basic, but then thought it would be better to make a copy of the first layer so I could inherit more of it’s properties. However, this code:

targetLayer = [[CALayer layer] initWithLayer:self.layer];

copied too much information and when I later tried to work with the layers I ran into the “already attached” problem. The correct way to create layers for my program (and what I started out with) is:
targetLayer = [CALayer layer];

Reverting that one change in my latest code base let me get back to making progress. Hopefully documenting my error here will save someone else a few minutes or hours if they run into the same issue.

Quick fix for TableViewCellSubviews sample project

Posted on : 02-06-2009 | By : Lane Roathe | In : Development, iPhone

Tags: , ,

0

Symptom

    The Sample Code for TableViewSuite, example 4 TableViewCellSubviews has an incorrect project setting that prevents running the sample in release.

Problem

    The problem is due to the TableViewCellSubviews project referencing the application as CustomTableViewCell instead of TableViewCellSubviews.

Solution

    FIX: edit the .pbxproj file for TableViewCellSubviews, and replace all instances of CustomTableViewCell with TableViewCellSubviews.

putpkt: write failed: Broken pipe

Posted on : 01-06-2009 | By : Lane Roathe | In : Development, iPhone

8

Hopefully this will provide some useful information for someone, because I did a lot of google searching and didn’t come up with an answer to this one that way.

After upgrading my sdk from 2.2.1 to 3.0 beta 5 I was no longer able to install my application on the iPhone. The compile, link, build and install process went fine but as soon as the application was launched, and before it got to main(), the app crashed. In the debugger I was getting putpkt: write failed: Broken pipe.

After hours (and hours) of various tests, back tracking, deleting, re-installing, restoring and other contortions I finally remembered that several weeks back I had added an entitlements plist to solve a similar issue. So, I deleted the reference to the plist from my project settings entitlement field, and it worked!.

That is, until I went to make a distribution build, at which time it failed again. However, this time it gave me the old, familiar error about an invalid entitlement. So, I re-added the entitlement plist reference and the ad-hoc installation worked.

Hopefully the final 3.0 SDK will correct this issue so that I don’t have to remember to do this each time I switch between development and distribution builds.