开发者

Difference between iPhone development and Mac OSX development [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
开发者_如何转开发

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 6 years ago.

Improve this question

This question is for all the programmers who code in iphone as well as the Mac OSX platform.

I have been searching on Google for quite some time, but I could not find any good answer, and so I am posting the question here. Please apologize if this is not a programming question.

  1. Question on development overview:

    I would like to know how the iphone development tools are different from Mac OSX development tools.

  2. Question on the programming language:

    Is the programming done in objective-c for mac-osx as well ? Will it be the same syntax and format (for example, to create a button or textField)... ?

  3. Question on the libraries:

    If the programming is done in Xcode, how will the classes and libraries for touch and navigation be for the development in Mac OSX. ? And is there an interface builder ?

  4. Question on Simulation and Testing:

    Is it as easy as iPhone development to simulate and test the app in a Simulator ?


  1. Many different UI elements and interactions.
  2. The same.
  3. Different.
  4. IMHO yes.

You may want to check out these posts to help you transition:

Jumping from iOS to OSX

Removing iOS SDKs from OSX


  • Tools are the same, you'll use Xcode just as with iOS Development.

  • The same language and syntax is used.

  • There are some differences, the most important being Garbage Collection, which is available on the Mac but not on iOS. View Controllers also play a different role and, of course, different libraries and APIs are used. Most of the UI elements you're used to on the iPhone (tabbar, navbars, ...) are not present on the Mac..

  • In terms of testing, it is pretty straightforward like on the iPhone.


The Apple provided tools are the same. I'ved used Xcode 3 to develop both an iPhone app and some companion Mac OSX software at the same time.

You can develop for both Mac and iPhone using Objective C or Swift, although there are a lot more options for programming languages on the Mac (Python, Ruby, etc.)

The Cocoa framework for the Mac and Cocoa Touch framework look very similar, but most have slightly different API names, calling conventions and behaviors that you will have to deal with. Plus, of course the UI is different between multi-touch and mouse/keyboard/menu/window interaction. But I took a one window one view iPhone app, and pretty much did a line-by-line translation of all the buttons, other UI elements, etc., to make a Mac version.

The iPhone Simulator runs an iOS app compiled for it just like another Mac app, but using different frameworks inside a one window semi-sandbox.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜