Mac os x support and sample app