After you make global search and replace operation in Xcode it adds xcLanguageSpecificationIdentifier
and lineEnding
to every manipulated file entry in *.pbxproj
files in the form of e.g.:
036B04CB1B2AE8A70010F649 /* MyClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyClass.m; sourceTree = "<group>"; };
to:
036B04CB1B2AE8A70010F649 /* MyClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = MyClass.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
What is it for?
Does it improve something like search performance?
If yes, how can I generate it for other files without making search and replace operation?
If no, how can I prevent Xcode from creating such things?
"Identifiers" or "symbols" are the names you supply for variables, types, functions, and labels in your program. Identifier names must differ in spelling and case from any keywords. You cannot use keywords (either C or Microsoft) as identifiers; they are reserved for special use.
C Identifiers Identifier refers to name given to entities such as variables, functions, structures etc. Identifiers must be unique. They are created to give a unique name to an entity to identify it during the execution of the program.
Identifiers are symbols used to uniquely identify a program element in the code. They are also used to refer to types, constants, macros and parameters. An identifier name should indicate the meaning and usage of the element being referred.
An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers in C language are the user-defined names consisting of 'C' standard character set. As the name says, identifiers are used to identify a particular element in a program.
I think xcLanguageSpecificationIdentifier
is just a temporary indication from Xcode 6 with Swift's comming; and you can find it in your project.pbxproj
if you write mixture code with Swift and objc.
For example, you have ProfileVC.h
and ProfileVC.m
, then you delete ProfileVC.h
and rename ProfileVC.m
to ProfileVC.swift
(and rewrite it in Swift), in your projectName.xcodeproject/project.pbxproj
, some line change from
49E89AB31C3D4494006C95BB /* ProfileVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProfileVC.m; sourceTree = "<group>";};
to
49E89AB31C3D4494006C95BB /* ProfileVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ProfileVC.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
However, in this situation, code in ProfileVC.swift seems not correctly colored, and code completion is broken. I delete the part xcLanguageSpecificationIdentifier = xcode.lang.objc; and everything goes quite OK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With