Skip to content

Final Graded Quiz: Working with Data in iOS :Working with Data in iOS (Meta iOS Developer Professional Certificate) Answers 2026

Question 1

What modifier should you use in a View to run a code asynchronously to query a REST API?

❌ onAppear
❌ viewDidAppear
task

Explanation:
SwiftUI me .task {} async operations (API calls) ke liye recommended hai.


Question 2

Which of the following is true for Core Data?

❌ Entities and contexts are the same things.
Entities and their relationships are the core of Core Data.
❌ Relationships have properties like names and prices.

Explanation:
Attributes store data, relationships sirf links banate hain.


Question 3

Populate Dessert entity properties?

❌ price as String
price as Double/Int value
❌ Key-value subscripting

Correct Answer:

newDessert.name = "Apple Pie"
newDessert.size = "large"
newDessert.price = 3.99

Explanation:
Core Data attributes direct assign hote hain, dictionary style nahi.


Question 4 (Select all that apply)

True statements?

✅ A Dish can hold information about multiple customers but a Customer can only hold information about one dish.
❌ Customer holds many dishes
consumedBy expects a set of customers

Explanation:
One-to-many relationship = Set<Customer>.


Question 5

Class that groups HTTP requests?

❌ NSRequests
URLSession
❌ URLSessionTask


Question 6

Which is true for @FetchRequest?

❌ Retrieves relationships
❌ Default creation order
Used to retrieve data from Core Data


Question 7

Compound predicates are used for?

❌ Math
❌ Sorting
Complex filtering


Question 8 (Select all that apply)

True for sort predicates?

❌ Sorting across entities
Single or multiple parameters of same entity
❌ Treat foreign characters like regular ones


Question 9

Filtering & sorting Core Data?

Sorting and filtering can happen simultaneously
❌ Must sort first
❌ Must filter first


Question 10 (Select all that apply)

Valid predicates?

Option 1 (NSCompoundPredicate OR)
Option 2 (NSPredicate OR)
❌ Option 3 (AND instead of OR)


Question 11

HTTP method to retrieve data?

❌ POST
GET
❌ PUT
❌ DELETE


Question 12

Correct API route naming?

❌ /api/user/12345/getUserInfo
❌ /api/fetch_user
❌ /api/getUsersData
/api/users


Question 13

Advantage of token-based authentication?

❌ Easier to implement
❌ Unlimited calls
More secure
❌ Works with all languages


Question 14

Main difference auth vs authorization?

❌ Physical vs virtual
❌ Who vs what (reversed)
Authentication once, authorization per action
❌ Password vs token


Question 15

First stage in API lifecycle?

❌ Processing
❌ Authentication
Request stage


Question 16

What is FetchRequest?

❌ Array sorting
❌ UI connector
❌ Persistence store
Property wrapper that retrieves Core Data entries


Question 17

RESTful API requirement?

❌ SOAP
Stateless architecture
❌ Server-side
❌ Require auth


Question 18

True about POST?

Comes with request body (payload) & creates resource
❌ URL params only
❌ XML only
❌ Multiple resources best practice


Question 19

HTTP code for wrong username/password?

❌ 403
401
❌ 200


Question 20

DELETE on collection endpoint?

❌ Delete one
❌ Delete entire collection
Delete only specific resource (/id)
❌ Delete all via /id


Question 21

What is URLSession?

❌ Simple HTTPS
❌ Simple HTTP
❌ Complex HTTP
Everything needed for complex HTTPS networking


Question 22

Swift JSON model vs JSON data?

❌ Must match exactly
Can have fewer properties; missing ignored
❌ Must have more properties


Question 23

Purpose of PersistenceController?

❌ UI
❌ View hierarchy
❌ Networking
Manage Core Data persistent store


Question 24

Purpose of NSSortDescriptor?

❌ Data format
Specify sort order & criteria
❌ Define relationships


Question 25

HTTP 403 means?

❌ Authentic source
❌ Wrong password
❌ Not authentic
Authenticated but not authorized


Question 26

Recommended noun usage in REST API?

❌ Singular
❌ Non-resource nouns
Plural nouns
❌ Arbitrary names


Question 27

What is Hashable?

❌ ML framework
Protocol for efficient Set/Dictionary storage
❌ Networking class
❌ Media library


Question 28

Menu item data format?

❌ Plain text
❌ XML
❌ CSV
JSON array of objects


Question 29

Redirection HTTP codes?

300–399
❌ 400–499
❌ 200–299
❌ 500–599


Question 30

Purpose of API versioning?

❌ Rate limiting
❌ Sorting/filtering
Protect clients from breaking changes
❌ Caching DB calls


🧾 Summary Table

Q Answer
1 task
2 Entities & relationships
3 Direct property assignment
4 A, C
5 URLSession
6 Retrieve Core Data
7 Complex filtering
8 Same-entity sorting
9 Sort + filter together
10 Option 1, 2
11 GET
12 /api/users
13 More secure
14 Auth once, authz per action
15 Request
16 Property wrapper
17 Stateless
18 POST creates resource
19 401
20 Delete specific resource
21 HTTPS networking
22 Fewer properties allowed
23 Persistent store manager
24 Sort descriptor
25 Forbidden
26 Plural nouns
27 Hashable protocol
28 JSON
29 300–399
30 Avoid breaking changes