10

In the new Xcode 6 beta, I attempted to make an Objective-C protocol. To my dismay, when I clicked Create New File, the protocol template we all knew and loved from previous Xcodes was gone.

enter image description here

I thoroughly scoured the entire Create File menu to no avail. Does anyone know where the protocol template can be found, or will I have to make one from scratch with an empty .h file?

Thankyou for your time.

Brian Tracy
  • 6,801
  • 2
  • 33
  • 48
  • I upgraded this question - I don't see why anyone downgraded it because it is a legitimate question. I think it is stupid for XCode to remove the protocol template and force us to copy in the lines Khanh gives below - if they are going to offer a template for a .h file and put C/C++ lines of code in that template that we then have to overwrite, there is no reason to not have a protocol template. Is it a huge deal? No. Is it annoying? yes. – Marc Dec 09 '14 at 20:36
  • @Marc Thankyou, Sir. The disappearance of the Protocols is very concerning. – Brian Tracy Dec 09 '14 at 21:58

2 Answers2

17

Add a new file . Source Heading -> Select "Objective C Empty File" -> Click Next. then give the protocol name -> in the dropdown list select Protocol option -> click Next button -> select the place you want to create protocol file -> click Create Button

Raj
  • 216
  • 2
  • 8
0

It's gone. Make a new .h file and paste this in

@protocol MyProtocol <NSObject>

@end
Khanh Nguyen
  • 11,112
  • 10
  • 52
  • 65