Skip to content

Commit

Permalink
Merge pull request #390 from CocoaPods/add-messages-extensions
Browse files Browse the repository at this point in the history
Add new Messages extension product types
  • Loading branch information
segiddins authored Jun 27, 2016
2 parents fb31bbb + c01a9bf commit 41ee4dc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
[#380](https://github.com/CocoaPods/Xcodeproj/pull/380)
[#383](https://github.com/CocoaPods/Xcodeproj/pull/383)

* Add new Messages extension product types to constants.
[Boris Bügling](https://github.com/neonichu)
[#390](https://github.com/CocoaPods/Xcodeproj/pull/390)

##### Bug Fixes

* None.
Expand Down
32 changes: 17 additions & 15 deletions lib/xcodeproj/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,23 @@ module Constants
# @return [Hash] The uniform type identifier of various product types.
#
PRODUCT_TYPE_UTI = {
:application => 'com.apple.product-type.application',
:framework => 'com.apple.product-type.framework',
:dynamic_library => 'com.apple.product-type.library.dynamic',
:static_library => 'com.apple.product-type.library.static',
:bundle => 'com.apple.product-type.bundle',
:octest_bundle => 'com.apple.product-type.bundle',
:unit_test_bundle => 'com.apple.product-type.bundle.unit-test',
:ui_test_bundle => 'com.apple.product-type.bundle.ui-testing',
:app_extension => 'com.apple.product-type.app-extension',
:command_line_tool => 'com.apple.product-type.tool',
:watch_app => 'com.apple.product-type.application.watchapp',
:watch2_app => 'com.apple.product-type.application.watchapp2',
:watch_extension => 'com.apple.product-type.watchkit-extension',
:watch2_extension => 'com.apple.product-type.watchkit2-extension',
:tv_extension => 'com.apple.product-type.tv-app-extension',
:application => 'com.apple.product-type.application',
:framework => 'com.apple.product-type.framework',
:dynamic_library => 'com.apple.product-type.library.dynamic',
:static_library => 'com.apple.product-type.library.static',
:bundle => 'com.apple.product-type.bundle',
:octest_bundle => 'com.apple.product-type.bundle',
:unit_test_bundle => 'com.apple.product-type.bundle.unit-test',
:ui_test_bundle => 'com.apple.product-type.bundle.ui-testing',
:app_extension => 'com.apple.product-type.app-extension',
:command_line_tool => 'com.apple.product-type.tool',
:watch_app => 'com.apple.product-type.application.watchapp',
:watch2_app => 'com.apple.product-type.application.watchapp2',
:watch_extension => 'com.apple.product-type.watchkit-extension',
:watch2_extension => 'com.apple.product-type.watchkit2-extension',
:tv_extension => 'com.apple.product-type.tv-app-extension',
:messages_extension => 'com.apple.product-type.app-extension.messages',
:sticker_pack => 'com.apple.product-type.app-extension.messages-sticker-pack',
}.freeze

# @return [Hash] The extensions or the various product UTIs.
Expand Down
2 changes: 1 addition & 1 deletion lib/xcodeproj/project/object/native_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def test_target_type?
#
def extension_target_type?
case symbol_type
when :app_extension, :watch_extension, :watch2_extension, :tv_extension
when :app_extension, :watch_extension, :watch2_extension, :tv_extension, :messages_extension
true
else
false
Expand Down
3 changes: 3 additions & 0 deletions spec/project/object/native_target_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,9 @@ module ProjectSpecs

@target.stubs(:symbol_type => :tv_extension)
@target.should.be.extension_target_type

@target.stubs(:symbol_type => :messages_extension)
@target.should.be.extension_target_type
end

it 'returns false for non-extension target types' do
Expand Down

0 comments on commit 41ee4dc

Please sign in to comment.