FVGetApp is an open source class to get and set default apps for protocols, MIME  types and extensions.