Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

##### Enhancements

* None.
* Add more Xcode file type references by file extension.
[Keith Smiley](https://github.com/keith)
[#465](https://github.com/CocoaPods/Xcodeproj/pull/465)

##### Bug Fixes

Expand Down
52 changes: 32 additions & 20 deletions lib/xcodeproj/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,38 @@ module Constants
# @return [Hash] The known file types corresponding to each extension.
#
FILE_TYPES_BY_EXTENSION = {
'a' => 'archive.ar',
'app' => 'wrapper.application',
'bundle' => 'wrapper.plug-in',
'dylib' => 'compiled.mach-o.dylib',
'framework' => 'wrapper.framework',
'h' => 'sourcecode.c.h',
'm' => 'sourcecode.c.objc',
'markdown' => 'text',
'mdimporter' => 'wrapper.cfbundle',
'octest' => 'wrapper.cfbundle',
'pch' => 'sourcecode.c.h',
'plist' => 'text.plist.xml',
'sh' => 'text.script.sh',
'swift' => 'sourcecode.swift',
'xcassets' => 'folder.assetcatalog',
'xcconfig' => 'text.xcconfig',
'xcdatamodel' => 'wrapper.xcdatamodel',
'xcodeproj' => 'wrapper.pb-project',
'xctest' => 'wrapper.cfbundle',
'xib' => 'file.xib',
'a' => 'archive.ar',
'apns' => 'text',
'app' => 'wrapper.application',
'appex' => 'wrapper.app-extension',
'bundle' => 'wrapper.plug-in',
'dylib' => 'compiled.mach-o.dylib',
'entitlements' => 'text.plist.entitlements',
'framework' => 'wrapper.framework',
'gif' => 'image.gif',
'gpx' => 'text.xml',
'h' => 'sourcecode.c.h',
'm' => 'sourcecode.c.objc',
'markdown' => 'text',
'mdimporter' => 'wrapper.cfbundle',
'mov' => 'video.quicktime',
'mp3' => 'audio.mp3',
'octest' => 'wrapper.cfbundle',
'pch' => 'sourcecode.c.h',
'plist' => 'text.plist.xml',
'png' => 'image.png',
'sh' => 'text.script.sh',
'sks' => 'file.sks',
'storyboard' => 'file.storyboard',
'strings' => 'text.plist.strings',
'swift' => 'sourcecode.swift',
'xcassets' => 'folder.assetcatalog',
'xcconfig' => 'text.xcconfig',
'xcdatamodel' => 'wrapper.xcdatamodel',
'xcodeproj' => 'wrapper.pb-project',
'xctest' => 'wrapper.cfbundle',
'xib' => 'file.xib',
'zip' => 'archive.zip',
}.freeze

# @return [Hash] The uniform type identifier of various product types.
Expand Down