Skip to content

Instantly share code, notes, and snippets.

@mrflip
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrflip/5310a2051a55214f05ce to your computer and use it in GitHub Desktop.
Save mrflip/5310a2051a55214f05ce to your computer and use it in GitHub Desktop.
Roomie Remote Image Remotes borken

I am trying to make a custom image remote. Roomie crashes even on a trivial modification to the DDK example.

I've tried a whole lot of things, but here I'll describe the most minimal test case I can conceive.

First, I reset my enviroment back to zero:

  • I first reset my configuration
  • Disabled Dropbox polling and Wifi sync
  • Removed ~/Dropbox/Roomie
  • Added one device (my Nest thermostat; I've tried with others.)
  • Backed up my configuration to Dropbox
  • Validated that the Roomie folder re-appeared; that the .plist files had only references to the one device; and that no images/ folder was present.

Next, I validated that I understand the DDK correctly:

  • I created a ~/Dropbox/roomie/images/ folder and copied the two files (remote-samsungtv2013.{xib,png}) into it.(*)
  • After a five count, I did 'Restore from Dropbox' on iPad.
  • Then I created an activity, choosing Device Nest, name whatevs, and an icon; then in remote design
    • chose background image,
    • custom
    • picked the one that was there
    • ( an ominous pause ... )
    • displays the correct image and button mapping;
    • put in a name
    • Save

This works, in that it doesn't crash; as I happen to own a Samsung TV I've tried this on one and it successfully controls the device.

(* I've also validated that it works to copy the retina file too; however, it shows up huge on the edit design page -- misaligned with the buttons -- and since the DDK is clear that the @2x file is optional I'm omitting it)

The repo at this point shows what I have.

Any modification makes it fail.

  • Took the sample remote from the Roomie DDK and made only these changes:
    • renamed the .xib and .png to remote-mrflip.xib and remote-mrflip.png;
    • changed the filename both places it appears in the .xib.
  • I placed those files into the ~/Dropbox/Roomie/images/ directory, next to the DDK originals.
  • and restored from Dropbox on iPad

At that point, choosing the new background image on a remote hangs in one of a couple ways:

  • Loads, screen scrunches up with blue button outlines behind the interface bars ("Show top bar", etc), hangs
  • Loads, image portion shrinks to zero height, hangs

Often, after about thirty seconds it will come back to life, but even when it does it will not display the new image. Opening the edit design page causes another indefinite hang.

I got it past one of the hangs and backed up to dropbox. You may view the exact assets I'm using here: https://gist.github.com/mrflip/5310a2051a55214f05ce Although the xib and png are not in a subdirectory in the gist, they are in the images subdirectory on my dropbox folder.

I'm at my wits end with this, and would love your help or advice.

Your reward for helping me is that I can finish the ruby API for editing remote layouts I whipped up (https://gist.github.com/mrflip/9e15703934d4dac32aff)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment