0
0
iOS Swiftmobile~20 mins

CI/CD with Xcode Cloud in iOS Swift - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Xcode Cloud Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Xcode Cloud Workflow Triggers

Which event in Xcode Cloud will automatically start a workflow when you push code to a branch?

AManual trigger only from Xcode Cloud dashboard
BWorkflow triggers only on schedule, not on code changes
CWorkflow starts only when a pull request is merged
DPush to a configured branch triggers the workflow automatically
Attempts:
2 left
💡 Hint

Think about what happens immediately after you push code to a branch in a CI/CD system.

💻 Command Output
intermediate
2:00remaining
Xcode Cloud Build Log Output

What will be the output in the Xcode Cloud build log if the Swift compiler finds a syntax error in your code?

iOS Swift
Compile Swift source files
/path/to/File.swift:10:5: error: expected expression
    let x = 
    ^
Aerror: expected expression at /path/to/File.swift:10:5
BBuild failed: missing Info.plist file
CBuild succeeded with warnings
DNo errors, build completed successfully
Attempts:
2 left
💡 Hint

Look for the compiler error message format in the log snippet.

Configuration
advanced
2:00remaining
Setting Environment Variables in Xcode Cloud

Which is the correct way to add a secret environment variable named API_KEY in Xcode Cloud for use during builds?

AAdd <code>API_KEY</code> as a user-defined build setting in the scheme
BAdd <code>API_KEY</code> in the <code>Build Settings</code> of the Xcode project
CAdd <code>API_KEY</code> in the <code>Environment Variables</code> section and mark it as secret
DAdd <code>API_KEY</code> in the <code>Info.plist</code> file
Attempts:
2 left
💡 Hint

Secrets should be stored securely and not in code or plist files.

Troubleshoot
advanced
2:00remaining
Diagnosing Xcode Cloud Build Failures

Your Xcode Cloud build fails with the message: Code signing failed: No matching provisioning profile found. What is the most likely cause?

AThe build machine ran out of disk space
BThe provisioning profile is missing or not uploaded to Xcode Cloud
CThe Swift version is incompatible with the project
DThe Info.plist file is corrupted
Attempts:
2 left
💡 Hint

Think about what code signing requires to succeed in a cloud build.

🔀 Workflow
expert
3:00remaining
Optimizing Xcode Cloud Workflow for Parallel Testing

You want to run your unit tests in parallel on multiple macOS instances in Xcode Cloud to speed up testing. Which configuration step is required to enable this?

AEnable the <code>Run tests in parallel</code> option in the workflow's test action settings
BUse a custom shell script to split tests manually
CAdd multiple test targets in the Xcode project
DDisable code signing to allow parallel execution
Attempts:
2 left
💡 Hint

Look for built-in Xcode Cloud features that support parallel testing.