66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# File 'lib/run_loop/cli/tcc.rb', line 66
def allow
debug = options[:debug]
device = options[:device]
if device
devices = [expect_device(options)]
else
devices = sim_control.simulators
end
service = options[:service]
if service
services = [service]
else
services = RunLoop::TCC::PRIVACY_SERVICES.map do |key, _|
key
end
end
app = options[:app]
simctl = RunLoop::Simctl.new
RunLoop::Environment.with_debugging(debug) do
devices.each do |_device|
_device.simulator_allow_location app
simctl.ensure_software_keyboard(_device)
tcc = RunLoop::TCC.new(_device, app)
services.each do |_service|
tcc.allow_service(_service)
end
end
end
true
end
|