bin/produce in produce-0.5.1 vs bin/produce in produce-0.6.0
- old
+ new
@@ -33,9 +33,93 @@
puts Produce::Manager.start_producing
end
end
+ command :enable_services do |c|
+ c.syntax = 'produce enable_services -a APP_IDENTIFIER SERVICE1, SERVICE2, ...'
+ c.description = 'Enable specific Application Services for a specific app on the Apple Developer Portal'
+ c.example 'Enable HealthKit, HomeKit and Passbook', 'produce enable_services -a com.example.app --healthkit --homekit --passbook'
+
+ c.option '--app-group', 'Enable App Groups'
+ c.option '--associated-domains', 'Enable Associated Domains'
+ c.option '--data-protection STRING', String, 'Enable Data Protection, suitable values are "complete", "unlessopen" and "untilfirstauth"'
+ c.option '--healthkit', 'Enable HealthKit'
+ c.option '--homekit', 'Enable HomeKit'
+ c.option '--wireless-conf', 'Enable Wireless Accessory Configuration'
+ c.option '--icloud STRING', String, 'Enable iCloud, suitable values are "legacy" and "cloudkit"'
+ c.option '--inter-app-audio', 'Enable Inter-App-Audio'
+ c.option '--passbook', 'Enable Passbook'
+ c.option '--push-notification', 'Enable Push notification (only enables the service, does not configure certificates)'
+ c.option '--vpn-conf', 'Enable VPN Configuration'
+
+ c.action do |args, options|
+ # Filter the options so that we can still build the configuration
+ allowed_keys = Produce::Options.available_options.collect { |config| config.key }
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+
+ require 'produce/service'
+ Produce::Service.enable(options, args)
+ end
+ end
+
+ command :disable_services do |c|
+ c.syntax = 'produce disable_services -a APP_IDENTIFIER SERVICE1, SERVICE2, ...'
+ c.description = 'Disable specific Application Services for a specific app on the Apple Developer Portal'
+ c.example 'Disable HealthKit', 'produce disable_services -a com.example.app --healthkit'
+
+ c.option '--app-group', 'Disable App Groups'
+ c.option '--associated-domains', 'Disable Associated Domains'
+ c.option '--data-protection', 'Disable Data Protection'
+ c.option '--healthkit', 'Disable HealthKit'
+ c.option '--homekit', 'Disable HomeKit'
+ c.option '--wireless-conf', 'Disable Wireless Accessory Configuration'
+ c.option '--icloud', 'Disable iCloud'
+ c.option '--inter-app-audio', 'Disable Inter-App-Audio'
+ c.option '--passbook', 'Disable Passbook'
+ c.option '--push-notification', 'Disable Push notifications'
+ c.option '--vpn-conf', 'Disable VPN Configuration'
+
+ c.action do |args, options|
+ # Filter the options so that we can still build the configuration
+ allowed_keys = Produce::Options.available_options.collect { |config| config.key }
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+
+ require 'produce/service'
+ Produce::Service.disable(options, args)
+ end
+ end
+
+ command :group do |c|
+ c.syntax = 'produce group'
+ c.description = 'Ensure that a specific App Group exists'
+ c.example 'Create group', 'produce group -g group.example.app -n "Example App Group"'
+
+ c.option '-n', '--group_name STRING', String, 'Name for the group that is created (PRODUCE_GROUP_NAME)'
+ c.option '-g', '--group_identifier STRING', String, 'Group identifier for the group (PRODUCE_GROUP_IDENTIFIER)'
+
+ c.action do |args, options|
+ allowed_keys = Produce::Options.available_options.collect { |config| config.key }
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+
+ require 'produce/group'
+ Produce::Group.new.create(options, args)
+ end
+ end
+
+ command :associate_group do |c|
+ c.syntax = 'produce associate_group -a APP_IDENTIFIER GROUP_IDENTIFIER1, GROUP_IDENTIFIER2, ...'
+ c.description = 'Associate with a group, which is create if needed or simply located otherwise'
+ c.example 'Associate with group', 'produce associate-group -a com.example.app group.example.com'
+
+ c.action do |args, options|
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__)
+
+ require 'produce/group'
+ Produce::Group.new.associate(options, args)
+ end
+ end
+
default_command :create
run!
end
end