你能在fastlane fastfile或lanes中执行循环或迭代(通过设备和语言)吗?
我需要在每个模拟器启动/结束之前和之后做一些事情。
答案 0 :(得分:2)
是的,您可以在fastlane lane中使用任何Ruby命令。
例如:
public static void main(String[] args) {
//declare grade and student array
int[] grades = new int[5];
String[] students = { "Bill", "Tom", "Mark", "Nic", "Miguel"};
Scanner sc = new Scanner(System.in);
for(int i = 0; i < grades.length; i++) {
grades[i] = i + 1;
//user input of student's grade
System.out.print("Enter grade for " + students[0] + ": ");
grades[0] = sc.nextInt();
System.out.print("Enter grade for " + students[1] + ": ");
grades[1] = sc.nextInt();
}
}