TipsMake

How to Make a Simple Program With Xcode

Ever wondered how everyone makes those great programs? Read on to find out how... Open Xcode. You may not have Xcode on your system, in that case, install it with the developer tools CD that should have come with your computer.

Method 1 of 1:

Snow Leopard and Later

  1. How to Make a Simple Program With Xcode Picture 1
    Beginning with Snow Leopard, Apple has deprecated the use of Applescript Studio, but fear not, in spite of a bit of extra typing, things are actually better without it. Go ahead and grab Xcode 3.2.5 or later. You can get 4.0 in the Mac App Store for free.
  2. How to Make a Simple Program With Xcode Picture 2
    File>New Project
  3. How to Make a Simple Program With Xcode Picture 3
    Click Applescript Application
  4. How to Make a Simple Program With Xcode Picture 4
    Name your project, this example is named "Talking Example"
  5. How to Make a Simple Program With Xcode Picture 5
    Your project should appear
  6. How to Make a Simple Program With Xcode Picture 6
    Double click "Talking_ExampleAppDelegate.applescript"
  7. How to Make a Simple Program With Xcode Picture 7
    There are already some items filled in for you. After the property declaration, insert a new handler:
    • on clickedme_(sender)
    • say "hello"
    • end clickedme_
  8. How to Make a Simple Program With Xcode Picture 8
    Type Cmd+B to build
  9. How to Make a Simple Program With Xcode Picture 9
    Now double-click MainMenu.xib
  10. How to Make a Simple Program With Xcode Picture 10
    Interface builder should open. Close any xib windows it brings up from previous projects you may have worked on.
  11. How to Make a Simple Program With Xcode Picture 11
    A blank window should appear and you can drag a button onto it from the Library.
  12. How to Make a Simple Program With Xcode Picture 12
    Double click the button and make it "Hello"
  13. How to Make a Simple Program With Xcode Picture 13
    CTRL-drag from the Hello button to the blue cube called "Talking Example AppDelegate" and let go. You can now pick the clicked-me event handler to link to the "Hello" button you just made.
  14. How to Make a Simple Program With Xcode Picture 14
    Now click file > save. You many now quit interface builder.
  15. How to Make a Simple Program With Xcode Picture 15
    In Xcode, press build and go at the top. Your application should run smoothly.

Discover more

click button hello project
Jessica Tanner

Share by

Jessica Tanner
Update 04 March 2020