In case of 2.2 and above (as of now) you have to go to where you unzipped cocos2d-x folder in the terminal, then go to tools, and then to project-creator folder then type the following to create a project .
project PROJECTNAMEpackage com.example.PROJECTNAME -language cpp
A new project would have been created in the projects folder with folder name PROJECTNAME. The projects folder is in the main folder where you unzipped cocos2d-x to.
Then you can go to proj.ios and open the xcode project to open the project in xcode.