Skip to content

Commit

Permalink
[WatchKit] Add options to launch different watch app type.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy authored and Watson1978 committed Dec 11, 2014
1 parent 2d49d51 commit abda204
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/motion/project/template/ios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ def pre_build_actions(platform)
app = App.config.app_bundle('iPhoneSimulator')
sim = File.join(App.config.bindir, 'watch-sim')
App.info 'Simulate', watch_extension.destination_bundle_path
sh "'#{sim}' '#{app}' -verbose #{App::VERBOSE ? 'YES' : 'NO'} -start-suspended #{ENV['no_continue'] ? 'YES' : 'NO'}"
command = "'#{sim}' '#{app}' -verbose #{App::VERBOSE ? 'YES' : 'NO'} -start-suspended #{ENV['no_continue'] ? 'YES' : 'NO'}"
command << " -type #{ENV['type']}" if ENV['type']
if ENV['type'] && ENV['type'].downcase == 'notification' && ENV['payload'].nil?
App.fail '[!] The `notification` option is required with `type=notification`.'
end
command << " -notification-payload '#{ENV['payload']}'" if ENV['payload']
sh(command)
end

desc "Run the simulator"
Expand Down

0 comments on commit abda204

Please sign in to comment.