Nicholas Pike

Like nailing jelly to a wall…

Archive for the ‘iphone’ Category

Scheduled iPhone Sync (OSX)

without comments

One of the more annoying things with having a “smart phone” is when its not uptodate with all your stuff.  A few weeks ago I wrote an AppleScript to sync my iPhone nightly at 3:00am every day.

Copy this script into the AppleScript editor, and save to a location on your harddrive.

tell application “iTunes”
repeat with s in sources
if (kind of s is iPod) then update s
end repeat
end tell

appleScript_iphonesyncNext step is to download and install Lingon and setup a launchd configuration to schedule your nightly iPhone sync.  Here are the settings I used:

lingon_iphonesync

Save your launchd configuration, logout and log back in – and enjoy!

Written by npike

November 23rd, 2009 at 10:42 pm

Posted in How To, iphone

Interface Builder: Tab Bar Application and children views

without comments

This is something that always bothered me while designing an iPhone UI in Interface Builder: When making a “Tab Bar Application”, my child/tab views were always messed up, and not rendered the same as what I would make in Interface Builder.

Of course the whole thing was a big neophyte mistake on my part, but I figured I would share my findings for others that have such a problem.

For the sake of this post, I am building an application called “DemoApp”, from the “Tab Bar Application” template in XCode.  My UI design in Interface Builder looks like this:

For the sake of this demo, I have also thrown away the default “SecondView” that comes with the template, in favor of using my own custom one as an example.

So how does this render on the iPhone?  Not at all how it looks in Interface Builder…

It took me FOREVER to figure out why my Views were getting clipped, and generally rendered incorrectly whenever I made a custom view to go inside of a TabBarController.  The secret?  On your custom view, enable the bottom bar!

So now your interface should look like this in InterfaceBuilder:

Which makes it MUCH easier to arrange your UI to render correctly inside of a TabBarController.  This little checkbox and my own carelessness caused me much stress and anger towards Interface Builder – hopefully this post will help someone resolve the problem more quickly than it took me!

Written by npike

June 29th, 2009 at 11:29 pm

I am a programmer, a scientist. I am NOT customer service.

with one comment

I really enjoy getting emails like the following, from users who don’t understand all the work it takes to give them something free to bash.

Well Connor.  Its people like you, that explains why I don’t bother wasting my time fixing bugs anymore.  Ungrateful and non-constructive emails like this ruin it for everyone else.

For those curious, my response to him was:

Hey Connor, just to let you know; constructive feedback helps me fix its problems.  Your email wasn’t very useful. Thanks

Written by npike

January 29th, 2009 at 12:15 am

Posted in AppStore, iXboxLive, iphone, ipod

Tagged with

Hacking your iTunes to enable management/playback of your iPhone music on multiple computers

with 3 comments


The iPhone has this nagging restriction, thats been driving me crazy since I traded in my iPod Touch as my main music playing device.

You can’t plug your iPhone into a second computer (for example, at work) and play back music from the iPhone on your computer!

This just makes no sense, because the iPod Touch (and any other iPod) can manually manage music on multiple computers.

Below is how you can hack your iTunes to circumvent this stupid restriction.  A few caveats:

  • I have no idea how well this will work if your 2nd installation of iTunes is actually managing any music in its library
  • I have no idea if you can actually add/remove songs from your iPhone on the 2nd computer.  I wouldn’t recommend it, but it probably will work.

Lets Begin

You will need a text editor, and a hex editor for your operating system of choice.  There are many free options for both Windows and OS X.  For this post I will be using Windows and Ultra-Edit.  Make sure iTunes is closed on both machines before making these changes.  Make sure to backup “iTunes Music Library.xml” and “iTunes Library.itl” on the second machine before editing.

Determine your iTunes Library ID for your first computer (the one your iPhone syncs with primarily)

  1. Locate your iTunes Music Library.xml  (Windows:  Usually in My Documents\Music\iTunes  OS X: Usually in /home/[username]/music/iTunes)
  2. Open this file in a text editor and find the line that looks like the following:

    <key>Library Persistent ID</key><string>79273A3FF1AD7693</string>

  3. Write down the value between the <string> tags, in my case “79273A3FF1AD7693

Hack your 2nd iTunes

On the second computer you wish to enable playback with, do the following:

  1. Open the same file from step 1 above on this computer
  2. Write down the existing <string> value like step 2 above.  (This will be different then the one you have already written down)
  3. Replace the existing <string> value with the one from step 3 above.
  4. Save. Close File
  5. In the same directory that you found “iTunes Music Library.xml”, you should also see “iTunes Library.itl”.  Open this in a hex editor.
  6. Search for your Library ID in the file.  If there are no results, try adding a space every two characters in the Library ID and search again.
  7. Replace this ID with the one from your first computer.  (Should be EXACTLY the same amount of characters, otherwise this will not work)
  8. Save file.
  9. Open iTunes, and plugin your iPhone!

Last Steps

Your 2nd iTunes might pop a warning that says your iPhone is currently synched with another computer, and that syncing will erase all content.  Cancel this dialog.  Make sure your iPhone is set to manually sync on this computer, and you should be fine!

Written by npike

August 22nd, 2008 at 8:11 am

Posted in hacking, iphone

Progress Update: iXboxLive 1.1

without comments

Wow!  I’ve gotten a huge response from the Internet about iXboxLive 1.0.  Over all mostly positive, but there are some big issues that I need to fix for the first update.

  • I’ve fixed the crash that occurs when theres no active internet connection, which often resulted in your iXboxLive buddy list to be whiped out.
  • I’ve hopefully fixed the source of random startup crashes.
  • I’ve increased loading performance significantly.  iXboxLive will load its main interface and add buddys to the buddy list as their information is retrieved.  (As opposed to what it does now, and waits for all the information retrieval to be finished before displaying the main interface)

More info to come.

Written by npike

August 9th, 2008 at 10:06 am

Posted in Projects, iXboxLive, iphone

Introducing iXboxLive – Available in the Apple AppStore

without comments

Xbox Live is great – there’s no questioning that, but sometimes you just really want to check your Buddy List without having to turn on the Xbox, or fire up Xbox.com in a browser.

iXboxLive is your Xbox Buddy List(*) on your iPhone or iPod Touch!

  • See your select buddy list
  • See what they are currently playing
  • See their gamer pic
  • See their gamer score, gamer reputation, and location
  • See their list of recent games, including scores and last played dates
  • More features to come!

* This application uses the Microsoft Xbox Community Developer SDK, which is private and only available to a limited number of developers.  Due to limitations of this SDK, you will have to specify which gamertags to view on your local buddy list, and you will not be able to use all of the features you would expect from Xbox.com (like messaging friends)
** It is highly discouraged to add more then a dozen or so gamertags to your local buddy list.  The initial loading time of the application will increase significantly for each gamertag you add – so be cautious!

Written by npike

August 6th, 2008 at 7:03 pm

Posted in AppStore, Projects, iphone

Sundays and Project #2

without comments

Now that project #1 is out the door, and pending Apple review… it is time to start planning and working on the more important project:  Porting MobileTwitter to the AppStore.

Laid some foundation work this afternoon, will definitely need to revisit the icons used in MobileTwitter 1.5 (as they look like crap, and I need someone to make me new ones)

Written by npike

August 3rd, 2008 at 5:11 pm

iXboxLive – Now with 10% more Xbox!

without comments

Changed around the Gamer Details screen a little bit again:

  • Using the Xbox Orange
  • Using the Gamer score icon where appropriate
  • Bold header for Recent Games list

Written by npike

August 1st, 2008 at 9:14 pm

Posted in Projects, iphone

iXboxLive: Who doesn’t love screenshots?

without comments

Nearing completion I think… today I changed the DetailsView around a little bit, and now it looks like this:

For reference, you can see what it looked like in the last revision here.

Written by npike

July 27th, 2008 at 2:01 pm

Posted in Projects, iphone

iXboxLive Screencast

without comments