Is it possible to do this in Xcode

Discussion in 'Mac Programming' started by SteveniMac, Apr 18, 2013.

  1. macrumors newbie

    Apr 15, 2013
    I want to know whether it is possible for Xcode to create any type of application that when opened, it would open a specified file on the desktop. It would also help if you could post the code to do this as well.
  2. macrumors 68020


    Feb 17, 2011
    Spokane, WA
  3. macrumors 6502

    May 29, 2011
    Littleton, Colorado, USA
    I would just put the file into an AppleScript application bundle and use the Finder to open it with the default application, for example:

    set theFile to path to resource "Fake Profile.spx" -- a fake system profile
    tell application "Finder" to open theFile -- open the file using the default application

Share This Page