changes for ios 8, xcode 6 and yosemite. NOTE: we need to confirm that this works on mavericks as well. otherwise we need to roll back this commit