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. Picture 1 of How to Make a Simple Program With Xcode
    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. Picture 2 of How to Make a Simple Program With Xcode
    File>New Project
  3. Picture 3 of How to Make a Simple Program With Xcode
    Click Applescript Application
  4. Picture 4 of How to Make a Simple Program With Xcode
    Name your project, this example is named "Talking Example"
  5. Picture 5 of How to Make a Simple Program With Xcode
    Your project should appear
  6. Picture 6 of How to Make a Simple Program With Xcode
    Double click "Talking_ExampleAppDelegate.applescript"
  7. Picture 7 of How to Make a Simple Program With Xcode
    There are already some items filled in for you. After the property declaration, insert a new handler:
    1. on clickedme_(sender)
    2. say "hello"
    3. end clickedme_
  8. Picture 8 of How to Make a Simple Program With Xcode
    Type Cmd+B to build
  9. Picture 9 of How to Make a Simple Program With Xcode
    Now double-click MainMenu.xib
  10. Picture 10 of How to Make a Simple Program With Xcode
    Interface builder should open. Close any xib windows it brings up from previous projects you may have worked on.
  11. Picture 11 of How to Make a Simple Program With Xcode
    A blank window should appear and you can drag a button onto it from the Library.
  12. Picture 12 of How to Make a Simple Program With Xcode
    Double click the button and make it "Hello"
  13. Picture 13 of How to Make a Simple Program With Xcode
    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. Picture 14 of How to Make a Simple Program With Xcode
    Now click file > save. You many now quit interface builder.
  15. Picture 15 of How to Make a Simple Program With Xcode
    In Xcode, press build and go at the top. Your application should run smoothly.
Update 04 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile