Complete the code to specify the type of certificate used for development in Xcode.
let certificateType = "[1]"
The Development certificate is used for building and testing apps on devices during development.
Complete the code to create a provisioning profile type for App Store distribution.
let profileType = "[1]"
The AppStore provisioning profile is used to distribute apps through the App Store.
Fix the error in the code that loads a provisioning profile by its name.
let profileName = "[1]" let profilePath = Bundle.main.path(forResource: profileName, ofType: "mobileprovision")
The path(forResource:ofType:) method expects the resource name without extension as the first argument and the extension as the second argument.
Fill both blanks to create a dictionary that maps certificate types to their descriptions.
let certificateDescriptions = ["Development": "[1]", "Distribution": "[2]"]
The Development certificate is for testing on devices, and the Distribution certificate is for submitting apps to the App Store.
Fill all three blanks to create a Swift dictionary comprehension that filters provisioning profiles by type and returns their names.
let profiles = ["DevProfile": "Development", "StoreProfile": "AppStore", "AdHocProfile": "AdHoc"] let filteredProfiles = profiles.filter { $0.value == "[1]" }.map { $0.[2] } let result = filteredProfiles.sorted(by: { $0.[3]($1) == .orderedAscending })
This code filters profiles for the AppStore type, maps to their keys (names), and sorts them alphabetically ignoring case.