0
0
iOS Swiftmobile~10 mins

CI/CD with Xcode Cloud in iOS Swift - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a workflow trigger for Xcode Cloud that starts on every push.

iOS Swift
workflow.trigger = [1]
Drag options to blanks, or click blank then click option'
A"pullRequest"
B"push"
C"manual"
D"schedule"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "pullRequest" instead of "push" causes the workflow to start only on pull requests.
2fill in blank
medium

Complete the code to add a build action to the Xcode Cloud workflow.

iOS Swift
workflow.addAction([1])
Drag options to blanks, or click blank then click option'
AbuildAction
BtestAction
CdeployAction
DarchiveAction
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing testAction will only run tests, not build the app.
3fill in blank
hard

Fix the error in setting the environment variable for the workflow.

iOS Swift
workflow.environmentVariables = {"API_KEY": [1]
Drag options to blanks, or click blank then click option'
A12345
Btrue
CAPI_KEY
D"12345"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes causes a syntax error or wrong value type.
4fill in blank
hard

Fill both blanks to configure the workflow to run tests only on the 'develop' branch.

iOS Swift
workflow.testAction.branch = [1]
workflow.trigger = [2]
Drag options to blanks, or click blank then click option'
A"develop"
B"push"
C"main"
D"pullRequest"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "main" branch or wrong trigger causes tests to run on wrong events.
5fill in blank
hard

Fill all three blanks to define a deployment step that uploads the build to TestFlight after a successful build.

iOS Swift
workflow.addAction({
  type: [1],
  destination: [2],
  condition: [3]
})
Drag options to blanks, or click blank then click option'
A"deploy"
B"TestFlight"
C"onSuccess"
D"build"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'build' as action type or wrong condition causes deployment failure.