0
0
iOS Swiftmobile~10 mins

Certificates and provisioning profiles 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 specify the type of certificate used for development in Xcode.

iOS Swift
let certificateType = "[1]"
Drag options to blanks, or click blank then click option'
AAdHoc
BDistribution
CEnterprise
DDevelopment
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing Distribution instead of Development.
Confusing Enterprise with Development certificates.
2fill in blank
medium

Complete the code to create a provisioning profile type for App Store distribution.

iOS Swift
let profileType = "[1]"
Drag options to blanks, or click blank then click option'
AAdHoc
BAppStore
CDevelopment
DEnterprise
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting Development instead of AppStore.
Confusing AdHoc with AppStore profiles.
3fill in blank
hard

Fix the error in the code that loads a provisioning profile by its name.

iOS Swift
let profileName = "[1]"
let profilePath = Bundle.main.path(forResource: profileName, ofType: "mobileprovision")
Drag options to blanks, or click blank then click option'
AMyAppProfile
BMyAppProfile.mobileprovision
Cmyappprofile.mobileprovision
Dprofile.mobileprovision
Attempts:
3 left
💡 Hint
Common Mistakes
Including the file extension in the resource name.
Using lowercase or incorrect profile names.
4fill in blank
hard

Fill both blanks to create a dictionary that maps certificate types to their descriptions.

iOS Swift
let certificateDescriptions = ["Development": "[1]", "Distribution": "[2]"]
Drag options to blanks, or click blank then click option'
AUsed for testing on devices
BUsed for submitting to App Store
CUsed for internal enterprise apps
DUsed for AdHoc distribution
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the descriptions of Development and Distribution.
Using descriptions for Enterprise or AdHoc instead.
5fill in blank
hard

Fill all three blanks to create a Swift dictionary comprehension that filters provisioning profiles by type and returns their names.

iOS Swift
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 })
Drag options to blanks, or click blank then click option'
ADevelopment
Bkey
ClocalizedCaseInsensitiveCompare
DAppStore
Attempts:
3 left
💡 Hint
Common Mistakes
Filtering by Development instead of AppStore.
Using value instead of key to map profile names.
Sorting with < instead of localizedCaseInsensitiveCompare.