Getting Bottom Bar Buttons to Follow an NSSplitView Pane (Code, wonky)

2010-10-26 20:00:00 -0400


In working on Strip for Mac OS X, I came across a scenario in which I wanted to get the bottom bar buttons on an NSWindow to follow the left-margin of panes about them in an NSSplitView with which they are associated. That sounds like a mouth full, so I’ll use a picture to illustrate, it’s an idea I’m looking to borrow from Apple’s Address Book application (click image to embiggen):

Adressbook Splitview 500w

What I’m trying to suggest with the annotations I’ve made on the image is that the [+] button under that middle pane (highlighted in green) will move as the left margin of the pane is moved, either by the user, or by the window being resized—which cascades down to the subview being resized, since the split view is basically the entirety of the window’s contents.

In any event, I wasn’t sure how to hack this out and didn’t see any examples out there, so I put one together. There might be a better, faster way of handling this, perhaps by responding to NSView notifications about a change in frame, but here I just used an NSSplitViewDelegate method that fires every time subviews are resized (thus, every time the margins of the panes might have been adjusted by a resize or a divider moving). Sample project is here on Github, but this is the meat of it, in the NSSplitView’s delegate:

// gets call after the NSSplitView is resized OR after the divider(s) are moved
- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification
{
[self repositionBottomBarButtons];
}

- (void)repositionBottomBarButtons
{
// we don't actually have to do anything for the left-most button and the left pane
// because we've got it pegged in IB to maintain it's position in relation to the
// window's bottom and left bounds

// first tell the superview that it will need to redraw the frame we'll be moving
NSRect oldFrame = [rightButton frame];
[[rightButton superview] setNeedsDisplayInRect:oldFrame];

NSPoint newOrigin = rightView.frame.origin;

NSRect newFrame = NSMakeRect(newOrigin.x, oldFrame.origin.y, oldFrame.size.width, oldFrame.size.height);
[rightButton setFrame:newFrame];
[rightButton setNeedsDisplay:YES];
}

And there we go, button now follows the pane’s margin, moves nice and smooth.


Advisory: Safe-guard STRIP Data When Migrating to a New iPhone or Upgrading iOS

2010-09-30 20:00:00 -0400


It has come to our attention that there is a potential for inadvertent loss of data in STRIP for customers who have purchased a new iPhone to replace an existing one. This may also affect other iOS devices such as iPod Touch and iPad.

When setting up a new iPhone in iTunes, iTunes offers to restore the data from your old device on to the new one. It would seem that in some cases the process appears to have been completed successfully, but the user later discovers that while Contacts and data from other default applications is transferred successfully, STRIP and other downloaded applications are missing their data. Some users have found (including us personally) that doing a second “Restore from Backup…” operation completes the migration successfully.

However, some users don’t notice the failed migration right away, and have at times discarded the old device (thus losing access to its copy of Strip’s data), or have synced their iPhone with iTunes since the initial Restore, which has the effect, in some cases, of wiping out the old backups maintained by iTunes. In that unlikely situation, it becomes nearly impossible to recover the user’s data.

Avoiding the Problem Before You Make the Switch

If you are planning to migrate to a new device or upgrade your iOS operating system, you’ll want to do the following before you make the switch. We’ll go through the various steps below.

  • Disable automatic syncing in iTunes
  • Turn off encrypted back up (temporarily)
  • Take a fresh backup in iTunes, explicitly
  • Use Strip Sync to take an independent backup of your data

As always, we are here if you run into trouble, please get in touch.

Disable automatic syncing in iTunes

Make sure your iPhone is disconnected from your computer. Open up iTunes, go to Preferences → Devices, and make sure the checkbox “Prevent iPods, iPhones, and iPads from syncing automatically” is checked.

Turn off encrypted backup (temporarily)

Connect your iPhone (or iPad or iPod Touch) to your computer with the USB cable that came with your device. If iTunes is not running, start it. Once the device appears in the left-hand side of the iTunes window, click on it to bring up the Summary screen. Scroll down to Options, and make sure that “Encrypt iPhone backup” is not checked.

Take a fresh backup in iTunes, explicitly

Every time you sync, iTunes will take a fresh backup, but it doesn’t necessarily keep that backup around for later. Doing it explicitly will keep the backup around for later in case we need to do a Restore.

In iTunes, with your phone still connected, right click on your phone’s icon and name in the left-side view of iTunes. In the menu that comes up, select “Back Up” to initiate a fresh, unencrypted back up.

The process may take a few minutes to complete.

If you had turned off encrypted backup in the previous step, you can now turn it back on.

Use Strip Sync to take an independent backup of your data

To ensure that you can have an independent backup outside of iTunes, we’ve published a free companion utility for Mac OS X and Windows called Strip Sync. It is important that you download and configure Strip Sync on your desktop. Once installed you’ll be able to sync your data off your iPhone and into Strip Sync over WiFi.

You can download Strip Sync for free over here: http://getstrip.com/strip-sync

Be sure to follow the setup instructions for your operating system:

Strip Sync works over WiFi on your home or office. If you have problems syncing the most likely cause is a firewall or network issue, and a good first step is to ensure your workstation firewall is disabled or at least allowing incoming connections. Do get in touch with us if you need help.


Codebook Updated in the App Store

2010-09-13 20:00:00 -0400


There’s an updated version of Codebook in the App Store, v1.3.0, which fixes a bit of a nuisance bug with regard to timestamps.


On the Subject of Online Backup for Strip

2010-08-15 20:00:00 -0400


We’ve received a few requests recently to provide an online or cloud-based backup/sync solution for our password manager Strip, in particular as to whether we plan to add an integration with Dropbox, so we figured now is a good time to provide a statement with regards to what direction we’re going.

We do not have plans to provide an integration with Dropbox for Strip at this time. While we agree an online backup would a really cool and useful feature, we’re uncomfortable with tying a core part of the product to another service that might change without consultation. That’s not to say anything at all about the utility or stability of Dropbox (it’s a really useful service done very well), but decisions made at Dropbox will always be out of our control.

Any online backup would require that the database file be stored remotely in an unknown location, with unknown security risks. That scenario makes us and many of our customers nervous, so we are reluctant to move in this direction without serious planning and risk evaluation.

We’ll continue to investigate the possibility of an online backup for Strip, but in the mean time, Strip can be backed up to the desktop with Strip Sync, providing multi-device replication. Our implementation requires authentication, and the files are always encrypted and secured on your local computers.


Strip 1.4.8 Released

2010-07-12 20:00:00 -0400


A new update to Strip, our password manager for the iPhone, has been approved by the Apple iTunes App Store, version 1.4.8. This is mostly a bug-fix release for version 1.4.7, and makes the changes list below. While this is a minor update, all users are strongly recommended to backup their data and update to the latest version to ensure compatibility with future versions of Strip.

  • Fixes crash on auto-save of Note during fast-app switching on iOS 4.
  • Autosave is now enabled when editing Notes with a hardware keyboard.
  • Displays GUID of data entities to facilitate sync support requests and debugging.
  • Corrects icon display on import.
  • Fixes a couple of NIB-related crashes introduced by iOS4.
  • Corrects a typo in one of the dialog prompts.

More updates are on the way, but they’re still a few weeks out, so make sure you get the latest and greatest. [ Get it on iTunes ]