Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Messages extension product types #390

Merged
merged 2 commits into from
Jun 27, 2016
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: 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